@aglyn/aglyn 1.0.0-beta.218 → 1.0.0-beta.220
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/package.json +12 -12
- package/src/lib/app-utils/actions.d.ts +26 -433
- package/src/lib/app-utils/actions.js +108 -633
- package/src/lib/app-utils/actions.js.map +1 -1
- package/src/lib/app-utils/activity-presenter.d.ts +3 -3
- package/src/lib/app-utils/activity-presenter.js +36 -52
- package/src/lib/app-utils/activity-presenter.js.map +1 -1
- package/src/lib/app-utils/analytics-events.d.ts +1 -1
- package/src/lib/app-utils/analytics-events.js.map +1 -1
- package/src/lib/app-utils/analytics-provider.d.ts +182 -0
- package/src/lib/app-utils/analytics-provider.js +133 -0
- package/src/lib/app-utils/analytics-provider.js.map +1 -0
- package/src/lib/app-utils/api-plugins.d.ts +46 -0
- package/src/lib/app-utils/api-plugins.js +19 -0
- package/src/lib/app-utils/api-plugins.js.map +1 -1
- package/src/lib/app-utils/{marketplace-overrides.d.ts → artifact-overrides.d.ts} +9 -6
- package/src/lib/app-utils/{marketplace-overrides.js → artifact-overrides.js} +10 -7
- package/src/lib/app-utils/artifact-overrides.js.map +1 -0
- package/src/lib/app-utils/{marketplace-provenance.d.ts → artifact-provenance.d.ts} +12 -10
- package/src/lib/app-utils/{marketplace-provenance.js → artifact-provenance.js} +9 -7
- package/src/lib/app-utils/artifact-provenance.js.map +1 -0
- package/src/lib/app-utils/binding-token-catalog.d.ts +5 -13
- package/src/lib/app-utils/binding-token-catalog.js +17 -41
- package/src/lib/app-utils/binding-token-catalog.js.map +1 -1
- package/src/lib/app-utils/brand-support-line.d.ts +36 -0
- package/src/lib/app-utils/brand-support-line.js +38 -0
- package/src/lib/app-utils/brand-support-line.js.map +1 -0
- package/src/lib/app-utils/collection-entries.d.ts +2 -2
- package/src/lib/app-utils/collection-entries.js.map +1 -1
- package/src/lib/app-utils/consent-group-change.d.ts +4 -0
- package/src/lib/app-utils/consent-group-change.js.map +1 -1
- package/src/lib/app-utils/consent-groups.d.ts +1 -1
- package/src/lib/app-utils/consent-groups.js.map +1 -1
- package/src/lib/app-utils/console-routes.d.ts +15 -42
- package/src/lib/app-utils/console-routes.js +10 -39
- package/src/lib/app-utils/console-routes.js.map +1 -1
- package/src/lib/app-utils/contacts.d.ts +24 -2
- package/src/lib/app-utils/contacts.js +21 -5
- package/src/lib/app-utils/contacts.js.map +1 -1
- package/src/lib/app-utils/container-membership.d.ts +93 -0
- package/src/lib/app-utils/container-membership.js +165 -0
- package/src/lib/app-utils/container-membership.js.map +1 -0
- package/src/lib/app-utils/crm-task-reminders.d.ts +23 -6
- package/src/lib/app-utils/crm-task-reminders.js +32 -11
- package/src/lib/app-utils/crm-task-reminders.js.map +1 -1
- package/src/lib/app-utils/crm.d.ts +24 -4
- package/src/lib/app-utils/crm.js +23 -0
- package/src/lib/app-utils/crm.js.map +1 -1
- package/src/lib/app-utils/cross-pool-desync.d.ts +39 -0
- package/src/lib/app-utils/cross-pool-desync.js +47 -0
- package/src/lib/app-utils/cross-pool-desync.js.map +1 -0
- package/src/lib/app-utils/csv-upload.d.ts +29 -0
- package/src/lib/app-utils/csv-upload.js +29 -0
- package/src/lib/app-utils/csv-upload.js.map +1 -0
- package/src/lib/app-utils/{dataset-csv.d.ts → csv.d.ts} +10 -43
- package/src/lib/app-utils/{dataset-csv.js → csv.js} +10 -81
- package/src/lib/app-utils/csv.js.map +1 -0
- package/src/lib/app-utils/dataset-models.d.ts +5 -5
- package/src/lib/app-utils/dataset-models.js +19 -2
- package/src/lib/app-utils/dataset-models.js.map +1 -1
- package/src/lib/app-utils/datasets.d.ts +65 -30
- package/src/lib/app-utils/datasets.js +74 -24
- package/src/lib/app-utils/datasets.js.map +1 -1
- package/src/lib/app-utils/docs-deflection.d.ts +6 -6
- package/src/lib/app-utils/docs-deflection.js.map +1 -1
- package/src/lib/app-utils/docs-help.generated.d.ts +14 -8
- package/src/lib/app-utils/docs-help.generated.js +23 -6
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.d.ts +2 -2
- package/src/lib/app-utils/docs-index.generated.js +570 -346
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/docs-retrieval.d.ts +3 -3
- package/src/lib/app-utils/docs-retrieval.js +14 -10
- package/src/lib/app-utils/docs-retrieval.js.map +1 -1
- package/src/lib/app-utils/duplicate-resource.d.ts +4 -1
- package/src/lib/app-utils/duplicate-resource.js +7 -4
- package/src/lib/app-utils/duplicate-resource.js.map +1 -1
- package/src/lib/app-utils/dynamic-list-rule.d.ts +1 -1
- package/src/lib/app-utils/dynamic-list-rule.js +3 -3
- package/src/lib/app-utils/dynamic-list-rule.js.map +1 -1
- package/src/lib/app-utils/element-ui.d.ts +1 -1
- package/src/lib/app-utils/element-ui.js +1 -1
- package/src/lib/app-utils/element-ui.js.map +1 -1
- package/src/lib/app-utils/email-starter-policy.js +3 -3
- package/src/lib/app-utils/email-starter-policy.js.map +1 -1
- package/src/lib/app-utils/email-text.d.ts +80 -0
- package/src/lib/app-utils/email-text.js +189 -0
- package/src/lib/app-utils/email-text.js.map +1 -0
- package/src/lib/app-utils/{list-assignment-policy.d.ts → enrollment-basis.d.ts} +4 -0
- package/src/lib/app-utils/{list-assignment-policy.js → enrollment-basis.js} +5 -1
- package/src/lib/app-utils/enrollment-basis.js.map +1 -0
- package/src/lib/app-utils/entity-picker-context.d.ts +10 -5
- package/src/lib/app-utils/entity-picker-context.js.map +1 -1
- package/src/lib/app-utils/error-beacon.d.ts +75 -6
- package/src/lib/app-utils/error-beacon.js +160 -21
- package/src/lib/app-utils/error-beacon.js.map +1 -1
- package/src/lib/app-utils/expand-repeatables.d.ts +10 -10
- package/src/lib/app-utils/expand-repeatables.js +14 -14
- package/src/lib/app-utils/expand-repeatables.js.map +1 -1
- package/src/lib/app-utils/forms.js +2 -2
- package/src/lib/app-utils/forms.js.map +1 -1
- package/src/lib/app-utils/health-report.d.ts +2 -3
- package/src/lib/app-utils/health-report.js +8 -6
- package/src/lib/app-utils/health-report.js.map +1 -1
- package/src/lib/app-utils/host-events.d.ts +82 -0
- package/src/lib/app-utils/host-events.js +62 -0
- package/src/lib/app-utils/host-events.js.map +1 -0
- package/src/lib/app-utils/inbound-mail-domain.d.ts +27 -0
- package/src/lib/app-utils/inbound-mail-domain.js +31 -0
- package/src/lib/app-utils/inbound-mail-domain.js.map +1 -0
- package/src/lib/app-utils/lockdown.d.ts +11 -0
- package/src/lib/app-utils/lockdown.js +33 -3
- package/src/lib/app-utils/lockdown.js.map +1 -1
- package/src/lib/app-utils/margin-utilization.d.ts +4 -69
- package/src/lib/app-utils/margin-utilization.js +82 -69
- package/src/lib/app-utils/margin-utilization.js.map +1 -1
- package/src/lib/app-utils/member-email-aliases.d.ts +25 -0
- package/src/lib/app-utils/member-email-aliases.js +29 -0
- package/src/lib/app-utils/member-email-aliases.js.map +1 -1
- package/src/lib/app-utils/node-definition-sanitizer.d.ts +16 -16
- package/src/lib/app-utils/node-definition-sanitizer.js +24 -20
- package/src/lib/app-utils/node-definition-sanitizer.js.map +1 -1
- package/src/lib/app-utils/node-interactions.d.ts +7 -7
- package/src/lib/app-utils/node-interactions.js.map +1 -1
- package/src/lib/app-utils/notifications.d.ts +147 -47
- package/src/lib/app-utils/notifications.js +182 -44
- package/src/lib/app-utils/notifications.js.map +1 -1
- package/src/lib/app-utils/operator-alerts.d.ts +15 -1
- package/src/lib/app-utils/operator-alerts.js +47 -10
- package/src/lib/app-utils/operator-alerts.js.map +1 -1
- package/src/lib/app-utils/payments-configured.d.ts +8 -21
- package/src/lib/app-utils/payments-configured.js +8 -23
- package/src/lib/app-utils/payments-configured.js.map +1 -1
- package/src/lib/app-utils/plan-entitlements.d.ts +207 -306
- package/src/lib/app-utils/plan-entitlements.js +345 -528
- package/src/lib/app-utils/plan-entitlements.js.map +1 -1
- package/src/lib/app-utils/platform-brand.d.ts +10 -0
- package/src/lib/app-utils/platform-brand.js +14 -3
- package/src/lib/app-utils/platform-brand.js.map +1 -1
- package/src/lib/app-utils/platform-marketing-consent.d.ts +56 -2
- package/src/lib/app-utils/platform-marketing-consent.js +6 -5
- package/src/lib/app-utils/platform-marketing-consent.js.map +1 -1
- package/src/lib/app-utils/plugin-api-rate-limit.d.ts +7 -1
- package/src/lib/app-utils/plugin-api-rate-limit.js +11 -3
- package/src/lib/app-utils/plugin-api-rate-limit.js.map +1 -1
- package/src/lib/app-utils/plugin-bundle-checks.js +2 -2
- package/src/lib/app-utils/plugin-bundle-checks.js.map +1 -1
- package/src/lib/app-utils/plugin-host-events.generated.d.ts +12 -0
- package/src/lib/app-utils/plugin-host-events.generated.js +169 -0
- package/src/lib/app-utils/plugin-host-events.generated.js.map +1 -0
- package/src/lib/app-utils/plugin-release-flags.generated.d.ts +12 -0
- package/src/lib/app-utils/plugin-release-flags.generated.js +106 -0
- package/src/lib/app-utils/plugin-release-flags.generated.js.map +1 -0
- package/src/lib/app-utils/plugin-starter-templates.generated.d.ts +12 -0
- package/src/lib/app-utils/plugin-starter-templates.generated.js +711 -0
- package/src/lib/app-utils/plugin-starter-templates.generated.js.map +1 -0
- package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
- package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
- package/src/lib/app-utils/release-flags.d.ts +14 -5
- package/src/lib/app-utils/release-flags.js +21 -125
- package/src/lib/app-utils/release-flags.js.map +1 -1
- package/src/lib/app-utils/repeat-query.d.ts +56 -0
- package/src/lib/app-utils/{dataset-query.js → repeat-query.js} +16 -16
- package/src/lib/app-utils/repeat-query.js.map +1 -0
- package/src/lib/app-utils/repeat-sources.d.ts +9 -0
- package/src/lib/app-utils/repeat-sources.js.map +1 -1
- package/src/lib/app-utils/retained-refusals.d.ts +73 -0
- package/src/lib/app-utils/retained-refusals.js +186 -0
- package/src/lib/app-utils/retained-refusals.js.map +1 -0
- package/src/lib/app-utils/scope-tokens.d.ts +27 -0
- package/src/lib/app-utils/scope-tokens.js +61 -0
- package/src/lib/app-utils/scope-tokens.js.map +1 -1
- package/src/lib/app-utils/screen-link-context.js +3 -3
- package/src/lib/app-utils/screen-link-context.js.map +1 -1
- package/src/lib/app-utils/screen-route.js +1 -1
- package/src/lib/app-utils/screen-route.js.map +1 -1
- package/src/lib/app-utils/seo-audit.d.ts +132 -0
- package/src/lib/app-utils/seo-audit.js +246 -0
- package/src/lib/app-utils/seo-audit.js.map +1 -0
- package/src/lib/app-utils/seo-keywords.d.ts +48 -0
- package/src/lib/app-utils/seo-keywords.js +60 -0
- package/src/lib/app-utils/seo-keywords.js.map +1 -0
- package/src/lib/app-utils/seo-page-facts.d.ts +66 -0
- package/src/lib/app-utils/seo-page-facts.js +155 -0
- package/src/lib/app-utils/seo-page-facts.js.map +1 -0
- package/src/lib/app-utils/seo-site-scan.d.ts +126 -0
- package/src/lib/app-utils/seo-site-scan.js +162 -0
- package/src/lib/app-utils/seo-site-scan.js.map +1 -0
- package/src/lib/app-utils/seo-title-variables.js +1 -1
- package/src/lib/app-utils/seo-title-variables.js.map +1 -1
- package/src/lib/app-utils/server.d.ts +13 -18
- package/src/lib/app-utils/server.js +33 -51
- package/src/lib/app-utils/server.js.map +1 -1
- package/src/lib/app-utils/site-interactions.d.ts +501 -0
- package/src/lib/app-utils/site-interactions.js +554 -0
- package/src/lib/app-utils/site-interactions.js.map +1 -0
- package/src/lib/app-utils/{marketplace-theme.d.ts → site-theme.d.ts} +13 -2
- package/src/lib/app-utils/{marketplace-theme.js → site-theme.js} +2 -2
- package/src/lib/app-utils/site-theme.js.map +1 -0
- package/src/lib/app-utils/sitemap.d.ts +4 -3
- package/src/lib/app-utils/sitemap.js +9 -7
- package/src/lib/app-utils/sitemap.js.map +1 -1
- package/src/lib/app-utils/stale-build-error.d.ts +51 -0
- package/src/lib/app-utils/stale-build-error.js +100 -1
- package/src/lib/app-utils/stale-build-error.js.map +1 -1
- package/src/lib/app-utils/starter-template-nodes.d.ts +137 -0
- package/src/lib/app-utils/starter-template-nodes.js +129 -0
- package/src/lib/app-utils/starter-template-nodes.js.map +1 -0
- package/src/lib/app-utils/starter-templates.d.ts +11 -34
- package/src/lib/app-utils/starter-templates.js +19 -230
- package/src/lib/app-utils/starter-templates.js.map +1 -1
- package/src/lib/app-utils/{email-topics.d.ts → subscription-topics.d.ts} +64 -48
- package/src/lib/app-utils/{email-topics.js → subscription-topics.js} +39 -109
- package/src/lib/app-utils/subscription-topics.js.map +1 -0
- package/src/lib/app-utils/tax-jurisdiction-figures.d.ts +118 -0
- package/src/lib/app-utils/tax-jurisdiction-figures.js +123 -0
- package/src/lib/app-utils/tax-jurisdiction-figures.js.map +1 -0
- package/src/lib/app-utils/theme-library.d.ts +10 -3
- package/src/lib/app-utils/theme-library.js +13 -4
- package/src/lib/app-utils/theme-library.js.map +1 -1
- package/src/lib/app-utils/usage-budget.d.ts +73 -188
- package/src/lib/app-utils/usage-budget.js +58 -194
- package/src/lib/app-utils/usage-budget.js.map +1 -1
- package/src/lib/app-utils/{campaign-attribution.d.ts → utm-attribution.d.ts} +11 -6
- package/src/lib/app-utils/{campaign-attribution.js → utm-attribution.js} +13 -8
- package/src/lib/app-utils/utm-attribution.js.map +1 -0
- package/src/lib/app-utils/{campaign-forwarding.d.ts → utm-forwarding.d.ts} +14 -14
- package/src/lib/app-utils/{campaign-forwarding.js → utm-forwarding.js} +26 -26
- package/src/lib/app-utils/utm-forwarding.js.map +1 -0
- package/src/lib/app-utils/{campaign-touch.d.ts → utm-touch.d.ts} +25 -17
- package/src/lib/app-utils/{campaign-touch.js → utm-touch.js} +38 -30
- package/src/lib/app-utils/utm-touch.js.map +1 -0
- package/src/lib/app-utils/variables.d.ts +9 -9
- package/src/lib/app-utils/variables.js.map +1 -1
- package/src/lib/app-utils/video-object.js +6 -5
- package/src/lib/app-utils/video-object.js.map +1 -1
- package/src/lib/app-utils/visitor-consent.d.ts +41 -164
- package/src/lib/app-utils/visitor-consent.js +66 -277
- package/src/lib/app-utils/visitor-consent.js.map +1 -1
- package/src/lib/app-utils/visitor-record-ceiling.d.ts +32 -0
- package/src/lib/app-utils/visitor-record-ceiling.js +39 -0
- package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -1
- package/src/lib/app-utils/web-vitals-rum.d.ts +7 -7
- package/src/lib/app-utils/web-vitals-rum.js +31 -63
- package/src/lib/app-utils/web-vitals-rum.js.map +1 -1
- package/src/lib/app-utils/where-used.d.ts +11 -6
- package/src/lib/app-utils/where-used.js +3 -8
- package/src/lib/app-utils/where-used.js.map +1 -1
- package/src/lib/foundation/definitions/components.types.d.ts +1 -1
- package/src/lib/foundation/definitions/components.types.js +1 -1
- package/src/lib/foundation/definitions/components.types.js.map +1 -1
- package/src/lib/foundation/definitions/org-billing.types.d.ts +11 -137
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
- package/src/lib/foundation/definitions/organization.types.d.ts +1 -3
- package/src/lib/foundation/definitions/organization.types.js.map +1 -1
- package/src/lib/foundation/definitions/platform.types.d.ts +11 -5
- package/src/lib/foundation/definitions/platform.types.js.map +1 -1
- package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +16 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.js +20 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -1
- package/src/lib/foundation/index.d.ts +1 -1
- package/src/lib/foundation/index.js.map +1 -1
- package/src/lib/plugin-manager/besigner-documents.d.ts +96 -0
- package/src/lib/plugin-manager/besigner-documents.js +61 -0
- package/src/lib/plugin-manager/besigner-documents.js.map +1 -0
- package/src/lib/plugin-manager/computed-variables.d.ts +71 -0
- package/src/lib/plugin-manager/computed-variables.js +74 -0
- package/src/lib/plugin-manager/computed-variables.js.map +1 -0
- package/src/lib/plugin-manager/custom-fields.d.ts +29 -2
- package/src/lib/plugin-manager/custom-fields.js +47 -1
- package/src/lib/plugin-manager/custom-fields.js.map +1 -1
- package/src/lib/plugin-manager/feature-plugins.d.ts +372 -99
- package/src/lib/plugin-manager/feature-plugins.js +126 -51
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +134 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js +840 -10
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
- package/src/lib/plugin-manager/index.d.ts +0 -1
- package/src/lib/plugin-manager/index.js +0 -1
- package/src/lib/plugin-manager/index.js.map +1 -1
- package/src/lib/plugin-manager/plugin-activity-actions.d.ts +12 -0
- package/src/lib/plugin-manager/plugin-activity-actions.js +25 -0
- package/src/lib/plugin-manager/plugin-activity-actions.js.map +1 -1
- package/src/lib/plugin-manager/plugin-contact-capture.d.ts +9 -4
- package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -1
- package/src/lib/plugin-manager/plugin-containers.d.ts +68 -0
- package/src/lib/plugin-manager/plugin-containers.generated.d.ts +10 -0
- package/src/lib/plugin-manager/plugin-containers.generated.js +20 -0
- package/src/lib/plugin-manager/plugin-containers.generated.js.map +1 -0
- package/src/lib/plugin-manager/plugin-containers.js +27 -0
- package/src/lib/plugin-manager/plugin-containers.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contributions.d.ts +1 -1
- package/src/lib/plugin-manager/plugin-contributions.js.map +1 -1
- package/src/lib/plugin-manager/plugin-declarations-repair.d.ts +36 -0
- package/src/lib/plugin-manager/plugin-declarations-repair.js +64 -0
- package/src/lib/plugin-manager/plugin-declarations-repair.js.map +1 -0
- package/src/lib/plugin-manager/plugin-dependents.d.ts +101 -0
- package/src/lib/plugin-manager/plugin-dependents.js +75 -0
- package/src/lib/plugin-manager/plugin-dependents.js.map +1 -0
- package/src/lib/plugin-manager/plugin-distribution.d.ts +55 -0
- package/src/lib/plugin-manager/plugin-distribution.js +45 -0
- package/src/lib/plugin-manager/plugin-distribution.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entitlements.d.ts +8 -0
- package/src/lib/plugin-manager/plugin-entitlements.js.map +1 -1
- package/src/lib/plugin-manager/plugin-host-collections.d.ts +17 -0
- package/src/lib/plugin-manager/plugin-host-collections.js +6 -0
- package/src/lib/plugin-manager/plugin-host-collections.js.map +1 -1
- package/src/lib/plugin-manager/plugin-host-resources.d.ts +133 -0
- package/src/lib/plugin-manager/plugin-host-resources.js +52 -0
- package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-membership-detach.js +1 -1
- package/src/lib/plugin-manager/plugin-membership-detach.js.map +1 -1
- package/src/lib/plugin-manager/plugin-org-erasure.d.ts +28 -2
- package/src/lib/plugin-manager/plugin-org-erasure.js +61 -2
- package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-plan-entitlements.d.ts +123 -0
- package/src/lib/plugin-manager/plugin-plan-entitlements.js +101 -0
- package/src/lib/plugin-manager/plugin-plan-entitlements.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-email-state.d.ts +69 -0
- package/src/lib/plugin-manager/plugin-record-email-state.js +32 -0
- package/src/lib/plugin-manager/plugin-record-email-state.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-index.d.ts +95 -0
- package/src/lib/plugin-manager/plugin-record-index.js +51 -0
- package/src/lib/plugin-manager/plugin-record-index.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-lists.d.ts +115 -0
- package/src/lib/plugin-manager/plugin-record-lists.js +75 -0
- package/src/lib/plugin-manager/plugin-record-lists.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-timeline.d.ts +42 -8
- package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-written.d.ts +58 -0
- package/src/lib/plugin-manager/plugin-record-written.js +42 -0
- package/src/lib/plugin-manager/plugin-record-written.js.map +1 -0
- package/src/lib/plugin-manager/plugin-revenue-sources.d.ts +213 -0
- package/src/lib/plugin-manager/plugin-revenue-sources.js +194 -0
- package/src/lib/plugin-manager/plugin-revenue-sources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-site-beacons.d.ts +71 -0
- package/src/lib/plugin-manager/plugin-site-beacons.js +54 -0
- package/src/lib/plugin-manager/plugin-site-beacons.js.map +1 -0
- package/src/lib/plugin-manager/plugin-site-bundle.d.ts +145 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js +78 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -0
- package/src/lib/plugin-manager/plugin-site-cache.d.ts +12 -0
- package/src/lib/plugin-manager/plugin-site-cache.js.map +1 -1
- package/src/lib/plugin-manager/plugin-site-export.d.ts +81 -0
- package/src/lib/plugin-manager/plugin-site-export.js +40 -0
- package/src/lib/plugin-manager/plugin-site-export.js.map +1 -0
- package/src/lib/plugin-manager/plugin-sitemap-sections.d.ts +88 -0
- package/src/lib/plugin-manager/plugin-sitemap-sections.js +29 -0
- package/src/lib/plugin-manager/plugin-sitemap-sections.js.map +1 -0
- package/src/lib/plugin-manager/plugin-subscription-topics.generated.d.ts +11 -0
- package/src/lib/plugin-manager/plugin-subscription-topics.generated.js +41 -0
- package/src/lib/plugin-manager/plugin-subscription-topics.generated.js.map +1 -0
- package/src/lib/plugin-manager/plugin-tax-profile.d.ts +20 -4
- package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -1
- package/src/lib/plugin-manager/plugin-tax-return-sources.d.ts +255 -0
- package/src/lib/plugin-manager/plugin-tax-return-sources.js +191 -0
- package/src/lib/plugin-manager/plugin-tax-return-sources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-template-sources.d.ts +75 -0
- package/src/lib/plugin-manager/plugin-template-sources.js +37 -0
- package/src/lib/plugin-manager/plugin-template-sources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-usage-axes.d.ts +319 -0
- package/src/lib/plugin-manager/plugin-usage-axes.js +186 -0
- package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -0
- package/src/lib/plugin-manager/plugin-usage-meters.d.ts +108 -0
- package/src/lib/plugin-manager/plugin-usage-meters.js +105 -0
- package/src/lib/plugin-manager/plugin-usage-meters.js.map +1 -0
- package/src/lib/plugin-manager/plugin-zones.d.ts +4 -5
- package/src/lib/plugin-manager/plugin-zones.js.map +1 -1
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
- package/src/lib/plugin-manager/record-captured-contact.d.ts +1 -14
- package/src/lib/plugin-manager/record-captured-contact.js +10 -32
- package/src/lib/plugin-manager/record-captured-contact.js.map +1 -1
- package/src/lib/plugin-manager/repeat-rows.d.ts +124 -0
- package/src/lib/plugin-manager/repeat-rows.js +108 -0
- package/src/lib/plugin-manager/repeat-rows.js.map +1 -0
- package/src/lib/plugin-manager/submission-record-target.d.ts +144 -0
- package/src/lib/plugin-manager/submission-record-target.js +125 -0
- package/src/lib/plugin-manager/submission-record-target.js.map +1 -0
- package/src/lib/plugin-manager/usage-alert-contributors.d.ts +76 -6
- package/src/lib/plugin-manager/usage-alert-contributors.js +23 -10
- package/src/lib/plugin-manager/usage-alert-contributors.js.map +1 -1
- package/src/lib/plugin-manager/video-embed-provider.d.ts +108 -0
- package/src/lib/plugin-manager/video-embed-provider.js +165 -0
- package/src/lib/plugin-manager/video-embed-provider.js.map +1 -0
- package/src/lib/types/nodes.d.ts +2 -2
- package/src/lib/types/nodes.js.map +1 -1
- package/src/lib/app-utils/assist-credits.d.ts +0 -482
- package/src/lib/app-utils/assist-credits.js +0 -509
- package/src/lib/app-utils/assist-credits.js.map +0 -1
- package/src/lib/app-utils/campaign-attribution.js.map +0 -1
- package/src/lib/app-utils/campaign-forwarding.js.map +0 -1
- package/src/lib/app-utils/campaign-membership.d.ts +0 -121
- package/src/lib/app-utils/campaign-membership.js +0 -189
- package/src/lib/app-utils/campaign-membership.js.map +0 -1
- package/src/lib/app-utils/campaign-touch.js.map +0 -1
- package/src/lib/app-utils/console-record-links.d.ts +0 -163
- package/src/lib/app-utils/console-record-links.js +0 -180
- package/src/lib/app-utils/console-record-links.js.map +0 -1
- package/src/lib/app-utils/contact-holder.d.ts +0 -68
- package/src/lib/app-utils/contact-holder.js +0 -129
- package/src/lib/app-utils/contact-holder.js.map +0 -1
- package/src/lib/app-utils/contact-merge.d.ts +0 -136
- package/src/lib/app-utils/contact-merge.js +0 -412
- package/src/lib/app-utils/contact-merge.js.map +0 -1
- package/src/lib/app-utils/crm-booking.d.ts +0 -75
- package/src/lib/app-utils/crm-booking.js +0 -133
- package/src/lib/app-utils/crm-booking.js.map +0 -1
- package/src/lib/app-utils/crm-csv.d.ts +0 -239
- package/src/lib/app-utils/crm-csv.js +0 -467
- package/src/lib/app-utils/crm-csv.js.map +0 -1
- package/src/lib/app-utils/crm-digest.d.ts +0 -185
- package/src/lib/app-utils/crm-digest.js +0 -272
- package/src/lib/app-utils/crm-digest.js.map +0 -1
- package/src/lib/app-utils/crm-inbound.d.ts +0 -245
- package/src/lib/app-utils/crm-inbound.js +0 -407
- package/src/lib/app-utils/crm-inbound.js.map +0 -1
- package/src/lib/app-utils/crm-reports.d.ts +0 -479
- package/src/lib/app-utils/crm-reports.js +0 -680
- package/src/lib/app-utils/crm-reports.js.map +0 -1
- package/src/lib/app-utils/dataset-csv.js.map +0 -1
- package/src/lib/app-utils/dataset-query.d.ts +0 -57
- package/src/lib/app-utils/dataset-query.js.map +0 -1
- package/src/lib/app-utils/email-topics.js.map +0 -1
- package/src/lib/app-utils/form-dataset-binding.d.ts +0 -50
- package/src/lib/app-utils/form-dataset-binding.js +0 -74
- package/src/lib/app-utils/form-dataset-binding.js.map +0 -1
- package/src/lib/app-utils/list-assignment-policy.js.map +0 -1
- package/src/lib/app-utils/list-import.d.ts +0 -158
- package/src/lib/app-utils/list-import.js +0 -332
- package/src/lib/app-utils/list-import.js.map +0 -1
- package/src/lib/app-utils/marketplace-listing-visibility.d.ts +0 -122
- package/src/lib/app-utils/marketplace-listing-visibility.js +0 -147
- package/src/lib/app-utils/marketplace-listing-visibility.js.map +0 -1
- package/src/lib/app-utils/marketplace-overrides.js.map +0 -1
- package/src/lib/app-utils/marketplace-provenance.js.map +0 -1
- package/src/lib/app-utils/marketplace-theme.js.map +0 -1
- package/src/lib/app-utils/marketplace-update-state.d.ts +0 -119
- package/src/lib/app-utils/marketplace-update-state.js +0 -132
- package/src/lib/app-utils/marketplace-update-state.js.map +0 -1
- package/src/lib/app-utils/publisher-agreement.d.ts +0 -289
- package/src/lib/app-utils/publisher-agreement.js +0 -321
- package/src/lib/app-utils/publisher-agreement.js.map +0 -1
- package/src/lib/app-utils/wistia-embed.d.ts +0 -104
- package/src/lib/app-utils/wistia-embed.js +0 -138
- package/src/lib/app-utils/wistia-embed.js.map +0 -1
- package/src/lib/app-utils/workflows.d.ts +0 -136
- package/src/lib/app-utils/workflows.js +0 -346
- package/src/lib/app-utils/workflows.js.map +0 -1
- package/src/lib/plugin-manager/commerce-zone-props.d.ts +0 -172
- package/src/lib/plugin-manager/commerce-zone-props.js +0 -31
- package/src/lib/plugin-manager/commerce-zone-props.js.map +0 -1
- package/src/lib/plugin-manager/plugin-metered-lines.d.ts +0 -97
- package/src/lib/plugin-manager/plugin-metered-lines.js +0 -123
- package/src/lib/plugin-manager/plugin-metered-lines.js.map +0 -1
|
@@ -15,98 +15,22 @@ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_wi
|
|
|
15
15
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
|
-
*/ import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { HOST_EVENT_TYPES } from "./workflows.js";
|
|
18
|
+
*/ import { CRM_TASK_MAX_DUE_DAYS, isContactLifecycleStage, isCrmActivityKind, isCrmTaskKind } from "./crm-kinds.js";
|
|
19
|
+
import { CUSTOM_EVENT_PATTERN, validateInteraction } from "./site-interactions.js";
|
|
20
|
+
import { HOST_EVENT_TYPES } from "./host-events.js";
|
|
22
21
|
/**
|
|
23
22
|
* Actions builder (AGL-148): HubSpot-style event → action automation on
|
|
24
23
|
* top of the AGL-128 event triggers. An action listens for a host event
|
|
25
24
|
* (built-in or a custom name fired by another action), optionally filters
|
|
26
25
|
* on the payload, and runs an ordered step list. Pure types + validation
|
|
27
|
-
* here; the executor lives
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
'elementClick',
|
|
36
|
-
'elementVisible',
|
|
37
|
-
// Hover choreography (AGL-562): delegated enter/leave on the trigger
|
|
38
|
-
// selector — the nav-menu/drawer show-hide building blocks.
|
|
39
|
-
'elementHoverEnter',
|
|
40
|
-
'elementHoverLeave',
|
|
41
|
-
'exitIntent',
|
|
42
|
-
'timeOnPage',
|
|
43
|
-
'pageVisit'
|
|
44
|
-
];
|
|
45
|
-
/** Site events that watch a specific element and need a selector. */ export const ELEMENT_SCOPED_SITE_EVENTS = [
|
|
46
|
-
'scrollToElement',
|
|
47
|
-
'elementClick',
|
|
48
|
-
'elementVisible',
|
|
49
|
-
'elementHoverEnter',
|
|
50
|
-
'elementHoverLeave'
|
|
51
|
-
];
|
|
52
|
-
export function isSiteEventType(event) {
|
|
53
|
-
return SITE_EVENT_TYPES.includes(event);
|
|
54
|
-
}
|
|
55
|
-
/** Structured condition operators (AGL-557). */ export const TRIGGER_CONDITION_OPS = [
|
|
56
|
-
'equals',
|
|
57
|
-
'contains',
|
|
58
|
-
'notEmpty'
|
|
59
|
-
];
|
|
60
|
-
/**
|
|
61
|
-
* Evaluates a structured trigger condition (AGL-557). String-coerces the
|
|
62
|
-
* payload value; `equals`/`contains` compare trimmed + case-insensitive
|
|
63
|
-
* so checkbox values like "Yes" match an author-typed "yes". A missing
|
|
64
|
-
* field never matches (and is "empty" for `notEmpty`); an absent or
|
|
65
|
-
* field-less condition always passes, mirroring the filter's default.
|
|
66
|
-
*/ export function evaluateTriggerCondition(condition, payload) {
|
|
67
|
-
var _condition_value;
|
|
68
|
-
var _condition_field;
|
|
69
|
-
const field = condition == null ? void 0 : (_condition_field = condition.field) == null ? void 0 : _condition_field.trim();
|
|
70
|
-
if (!condition || !field) return true;
|
|
71
|
-
const raw = (payload != null ? payload : {})[field];
|
|
72
|
-
const actual = (raw == null ? '' : String(raw)).trim().toLowerCase();
|
|
73
|
-
if (condition.op === 'notEmpty') return actual.length > 0;
|
|
74
|
-
const expected = String((_condition_value = condition.value) != null ? _condition_value : '').trim().toLowerCase();
|
|
75
|
-
if (condition.op === 'equals') return actual === expected;
|
|
76
|
-
if (condition.op === 'contains') {
|
|
77
|
-
return expected.length > 0 && actual.includes(expected);
|
|
78
|
-
}
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
/** How chained trigger conditions combine (AGL-565). */ export const TRIGGER_COMBINATORS = [
|
|
82
|
-
'and',
|
|
83
|
-
'or'
|
|
84
|
-
];
|
|
85
|
-
/** Cap on chained conditions per trigger (AGL-565). */ export const ACTION_MAX_CONDITIONS = 5;
|
|
86
|
-
/**
|
|
87
|
-
* Normalizes a trigger's condition clauses to a list (AGL-565): the
|
|
88
|
-
* `conditions` array wins when present; a legacy single `condition`
|
|
89
|
-
* (AGL-557) becomes a one-element list. Read-time only — persisted docs
|
|
90
|
-
* are never migrated, so pre-565 single-condition docs keep working
|
|
91
|
-
* unchanged.
|
|
92
|
-
*/ export function normalizeTriggerConditions(trigger) {
|
|
93
|
-
const conditions = trigger == null ? void 0 : trigger.conditions;
|
|
94
|
-
if (Array.isArray(conditions)) return conditions.filter(Boolean);
|
|
95
|
-
return (trigger == null ? void 0 : trigger.condition) ? [
|
|
96
|
-
trigger.condition
|
|
97
|
-
] : [];
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Evaluates a trigger's condition list with its combinator (AGL-565):
|
|
101
|
-
* `and` (the default) requires every condition to pass, `or` any one.
|
|
102
|
-
* Per-condition semantics are unchanged from AGL-557
|
|
103
|
-
* (`evaluateTriggerCondition`), and an empty list always passes — which
|
|
104
|
-
* covers every pre-565 doc without conditions.
|
|
105
|
-
*/ export function evaluateTriggerConditions(trigger, payload) {
|
|
106
|
-
const conditions = normalizeTriggerConditions(trigger);
|
|
107
|
-
if (!conditions.length) return true;
|
|
108
|
-
return (trigger == null ? void 0 : trigger.combinator) === 'or' ? conditions.some((condition)=>evaluateTriggerCondition(condition, payload)) : conditions.every((condition)=>evaluateTriggerCondition(condition, payload));
|
|
109
|
-
}
|
|
26
|
+
* here; the executor lives in the workflows plugin, where the I/O is.
|
|
27
|
+
*
|
|
28
|
+
* An action is a SITE INTERACTION (`site-interactions.ts`) with server steps
|
|
29
|
+
* added: its trigger, its conditions, its client steps and its storage are
|
|
30
|
+
* the platform's, and are re-exported here for the readers that take both
|
|
31
|
+
* from this module. What is declared below is the automation's own — the
|
|
32
|
+
* server steps, flows, recipes and webhooks.
|
|
33
|
+
*/ export * from "./site-interactions.js";
|
|
110
34
|
/**
|
|
111
35
|
* The scope key a resumed flow carries to say the wait ended on the CLOCK
|
|
112
36
|
* rather than on the event it was watching for.
|
|
@@ -116,45 +40,6 @@ export function isSiteEventType(event) {
|
|
|
116
40
|
* naming this field. Underscored because it shares a namespace with the
|
|
117
41
|
* event payload's own fields, which are merchant-authored form field names.
|
|
118
42
|
*/ export const FLOW_TIMED_OUT_FIELD = '_waitTimedOut';
|
|
119
|
-
/**
|
|
120
|
-
* Evaluates a step's own guard, with the trigger's semantics.
|
|
121
|
-
*
|
|
122
|
-
* An absent or clause-less guard passes, exactly as an absent trigger
|
|
123
|
-
* condition does — so every step written before guards existed keeps running.
|
|
124
|
-
*/ export function evaluateStepGuard(guard, scope) {
|
|
125
|
-
var _ref;
|
|
126
|
-
const conditions = ((_ref = guard == null ? void 0 : guard.conditions) != null ? _ref : []).filter(Boolean);
|
|
127
|
-
if (!conditions.length) return true;
|
|
128
|
-
return (guard == null ? void 0 : guard.combinator) === 'or' ? conditions.some((condition)=>evaluateTriggerCondition(condition, scope)) : conditions.every((condition)=>evaluateTriggerCondition(condition, scope));
|
|
129
|
-
}
|
|
130
|
-
/** Steps the tenant page runtime executes client-side (AGL-257). */ export const CLIENT_ACTION_STEP_TYPES = new Set([
|
|
131
|
-
'showOverlay',
|
|
132
|
-
'stickyNav',
|
|
133
|
-
'addClass',
|
|
134
|
-
'removeClass',
|
|
135
|
-
'toggleClass',
|
|
136
|
-
'showElement',
|
|
137
|
-
'hideElement',
|
|
138
|
-
'toggleElement',
|
|
139
|
-
'openDrawer',
|
|
140
|
-
'closeDrawer',
|
|
141
|
-
'toggleDrawer',
|
|
142
|
-
'openMenu',
|
|
143
|
-
'closeMenu',
|
|
144
|
-
'toggleMenu',
|
|
145
|
-
'setAttribute',
|
|
146
|
-
'removeAttribute',
|
|
147
|
-
'scrollTo',
|
|
148
|
-
'playVideo',
|
|
149
|
-
'showHtml',
|
|
150
|
-
'runJs',
|
|
151
|
-
'redirect',
|
|
152
|
-
'trackGaEvent',
|
|
153
|
-
'siteAlert'
|
|
154
|
-
]);
|
|
155
|
-
export function isClientActionStep(step) {
|
|
156
|
-
return CLIENT_ACTION_STEP_TYPES.has(step.type);
|
|
157
|
-
}
|
|
158
43
|
/**
|
|
159
44
|
* The steps that suspend a run and continue it later, from a job beat.
|
|
160
45
|
*
|
|
@@ -169,21 +54,6 @@ export function isClientActionStep(step) {
|
|
|
169
54
|
export function isFlowSuspendingStep(step) {
|
|
170
55
|
return FLOW_SUSPENDING_STEP_TYPES.has(step.type);
|
|
171
56
|
}
|
|
172
|
-
/**
|
|
173
|
-
* The steps that act on the CRM (AGL-2605) — named as a set because the
|
|
174
|
-
* executor dispatches all five to one module and the docs list them as one
|
|
175
|
-
* group, and a step added to the union but not here would be a server step
|
|
176
|
-
* the executor silently skipped.
|
|
177
|
-
*/ export const CRM_ACTION_STEP_TYPES = new Set([
|
|
178
|
-
'setContactStage',
|
|
179
|
-
'addContactTag',
|
|
180
|
-
'assignContactOwner',
|
|
181
|
-
'createCrmTask',
|
|
182
|
-
'logCrmActivity'
|
|
183
|
-
]);
|
|
184
|
-
export function isCrmActionStep(step) {
|
|
185
|
-
return CRM_ACTION_STEP_TYPES.has(step.type);
|
|
186
|
-
}
|
|
187
57
|
/** Longest tag an automation may write — the console's own tag field cap. */ export const CONTACT_TAG_MAX_LENGTH = 60;
|
|
188
58
|
/*
|
|
189
59
|
* THE RECIPES (AGL-2626).
|
|
@@ -240,6 +110,11 @@ export const CRM_ACTION_RECIPES = [
|
|
|
240
110
|
* The email comes before any wait, which makes it an immediate reply to
|
|
241
111
|
* what the visitor just did — transactional, sent from the org's own
|
|
242
112
|
* identity, to the address the event carries.
|
|
113
|
+
*
|
|
114
|
+
* Its words promise no response time. The org hub installs this recipe
|
|
115
|
+
* into a site without its editor opening, so the business never reads
|
|
116
|
+
* the sentence it is sending, and a "within a day" written here would be
|
|
117
|
+
* a commitment made on its behalf that nothing in the run keeps.
|
|
243
118
|
*/ build: ()=>({
|
|
244
119
|
recipe: 'welcomeNewLead',
|
|
245
120
|
name: 'Welcome a new lead',
|
|
@@ -268,7 +143,7 @@ export const CRM_ACTION_RECIPES = [
|
|
|
268
143
|
{
|
|
269
144
|
type: 'sendEmail',
|
|
270
145
|
subject: 'Thanks for getting in touch',
|
|
271
|
-
body: 'Thanks for reaching out
|
|
146
|
+
body: 'Thanks for reaching out. We have your message and will reply ' + 'to this email address.'
|
|
272
147
|
},
|
|
273
148
|
{
|
|
274
149
|
type: 'addContactTag',
|
|
@@ -450,107 +325,6 @@ export function hostActionDocument(action) {
|
|
|
450
325
|
...suspendAt < 0 ? list : list.slice(0, suspendAt)
|
|
451
326
|
];
|
|
452
327
|
}
|
|
453
|
-
/**
|
|
454
|
-
* Basic presentational interactions (AGL-577): the subset of client steps
|
|
455
|
-
* that are pure DOM choreography — menu/drawer open-close, element
|
|
456
|
-
* show/hide, class toggles, sticky nav, navigation, and client-only
|
|
457
|
-
* alerts. They carry NO server cost and touch NO data, so they run on
|
|
458
|
-
* every plan (the `interactions` feature, on by default everywhere).
|
|
459
|
-
*
|
|
460
|
-
* The powerful client steps stay behind the `actions` entitlement:
|
|
461
|
-
* `showOverlay` (marketing overlays), `showHtml` (arbitrary HTML
|
|
462
|
-
* injection), and `trackGaEvent` (analytics). `runJs` keeps its own
|
|
463
|
-
* higher `webhooks` (Business) gate. Server steps
|
|
464
|
-
* (sendEmail/notifyAdmins/enrollList/updateDataset/assignCampaign) are
|
|
465
|
-
* re-checked against `actions` server-side in `runEventActions`.
|
|
466
|
-
*/ export const BASIC_CLIENT_ACTION_STEP_TYPES = new Set([
|
|
467
|
-
'stickyNav',
|
|
468
|
-
'addClass',
|
|
469
|
-
'removeClass',
|
|
470
|
-
'toggleClass',
|
|
471
|
-
'showElement',
|
|
472
|
-
'hideElement',
|
|
473
|
-
'toggleElement',
|
|
474
|
-
'openDrawer',
|
|
475
|
-
'closeDrawer',
|
|
476
|
-
'toggleDrawer',
|
|
477
|
-
'openMenu',
|
|
478
|
-
'closeMenu',
|
|
479
|
-
'toggleMenu',
|
|
480
|
-
'setAttribute',
|
|
481
|
-
'removeAttribute',
|
|
482
|
-
// Moving the page and pressing a player the author placed: no data, no
|
|
483
|
-
// server, and nothing a Video element's own poster does not already do
|
|
484
|
-
// on every plan.
|
|
485
|
-
'scrollTo',
|
|
486
|
-
'playVideo',
|
|
487
|
-
'redirect',
|
|
488
|
-
'siteAlert'
|
|
489
|
-
]);
|
|
490
|
-
/** A client step available on all plans (no `actions` entitlement). */ export function isBasicClientActionStep(step) {
|
|
491
|
-
return BASIC_CLIENT_ACTION_STEP_TYPES.has(step.type);
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* Whether a client step may run for the given entitlement tier (AGL-577).
|
|
495
|
-
* This is the single source of truth the page enricher uses to trim the
|
|
496
|
-
* client-automation payload per plan:
|
|
497
|
-
*
|
|
498
|
-
* - Basic presentational steps → always (every plan).
|
|
499
|
-
* - `runJs` → `allowJs` (Business `webhooks` tier).
|
|
500
|
-
* - Remaining advanced client steps (overlay / showHtml / analytics) →
|
|
501
|
-
* `actionsEntitled` (`actions` tier).
|
|
502
|
-
*
|
|
503
|
-
* Server steps are not client steps and always return false here; they
|
|
504
|
-
* are dispatched and re-authorized server-side.
|
|
505
|
-
*/ export function isClientStepEntitled(step, entitlements) {
|
|
506
|
-
if (!isClientActionStep(step)) return false;
|
|
507
|
-
if (isBasicClientActionStep(step)) return true;
|
|
508
|
-
if (step.type === 'runJs') return entitlements.allowJs;
|
|
509
|
-
return entitlements.actionsEntitled;
|
|
510
|
-
}
|
|
511
|
-
export const ACTION_MAX_STEPS = 10;
|
|
512
|
-
/** Custom-event chaining depth cap (mirrors CROSS_MAX_DEPTH). */ export const ACTION_MAX_EVENT_DEPTH = 3;
|
|
513
|
-
/**
|
|
514
|
-
* Cap on the parameters one `trackGaEvent` step may carry (AGL-1587).
|
|
515
|
-
*
|
|
516
|
-
* Not a storage concern. These pairs are the least trustworthy analytics
|
|
517
|
-
* input on the platform — both halves are typed by a site author and land in
|
|
518
|
-
* that site's own GA4 property — and a bounded list is one an author can read
|
|
519
|
-
* back in full before publishing, which is the only review a parameter ever
|
|
520
|
-
* gets. GA4 caps custom parameters per event as well and drops the overflow
|
|
521
|
-
* without saying so, so an unbounded editor would let an author configure
|
|
522
|
-
* parameters that are never delivered and never explained. Ten, the same
|
|
523
|
-
* ceiling {@link ACTION_MAX_STEPS} puts on the step list itself.
|
|
524
|
-
*/ export const ACTION_MAX_EVENT_PARAMS = 10;
|
|
525
|
-
/**
|
|
526
|
-
* Longest analytics parameter NAME GA4 accepts; it drops a longer one on
|
|
527
|
-
* arrival, so a name over this is silence rather than a truncated dimension.
|
|
528
|
-
* The value half is capped by `ANALYTICS_PARAM_MAX_LENGTH`, which truncates
|
|
529
|
-
* instead of dropping.
|
|
530
|
-
*/ export const ACTION_EVENT_PARAM_NAME_MAX_LENGTH = 40;
|
|
531
|
-
/** Self-dismiss triggers for shown elements (AGL-589). */ export const ELEMENT_DISMISS_OPTIONS = [
|
|
532
|
-
'escape',
|
|
533
|
-
'outsideClick'
|
|
534
|
-
];
|
|
535
|
-
/** Visibility grace-delay ceiling — enough for hover travel, no dead UIs. */ export const ELEMENT_VISIBILITY_MAX_DELAY_MS = 5000;
|
|
536
|
-
/**
|
|
537
|
-
* How a `scrollTo` step moves the page. Stored in documents; never rename a
|
|
538
|
-
* value. `instant` rather than the DOM's `auto`, because `auto` defers to the
|
|
539
|
-
* site's CSS `scroll-behavior` — a site that sets `smooth` there would animate
|
|
540
|
-
* a scroll the author asked to be instant.
|
|
541
|
-
*/ export const SCROLL_TO_BEHAVIORS = [
|
|
542
|
-
'smooth',
|
|
543
|
-
'instant'
|
|
544
|
-
];
|
|
545
|
-
/**
|
|
546
|
-
* The largest offset a `scrollTo` step may leave above its target.
|
|
547
|
-
*
|
|
548
|
-
* The offset exists to clear a sticky header, which is tens of pixels and
|
|
549
|
-
* rarely more than a few hundred with an announcement bar stacked on it. A
|
|
550
|
-
* thousand leaves room for any header while still refusing the extra digit
|
|
551
|
-
* that would park the target off the bottom of the screen.
|
|
552
|
-
*/ export const SCROLL_TO_MAX_OFFSET_PX = 1000;
|
|
553
|
-
/** Custom event names: short, no collision with built-ins. */ export const CUSTOM_EVENT_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]{1,39}$/;
|
|
554
328
|
/**
|
|
555
329
|
* The shortest and longest a flow may wait.
|
|
556
330
|
*
|
|
@@ -563,28 +337,6 @@ export const ACTION_MAX_STEPS = 10;
|
|
|
563
337
|
* indistinguishable from one nobody will ever collect.
|
|
564
338
|
*/ export const FLOW_WAIT_MIN_MINUTES = 1;
|
|
565
339
|
export const FLOW_WAIT_MAX_MINUTES = 90 * 24 * 60;
|
|
566
|
-
/**
|
|
567
|
-
* The attribute names an interaction may write (AGL-2546).
|
|
568
|
-
*
|
|
569
|
-
* An unrestricted attribute setter is a self-XSS vector authored through the
|
|
570
|
-
* interactions UI: it reaches `href`, `src`, `onclick`, `formaction` and
|
|
571
|
-
* `style`, and on a site with collaborators the author and the victim need
|
|
572
|
-
* not be the same person. `aria-*` and `data-*` carry the entire
|
|
573
|
-
* accessibility use case and none of that exposure.
|
|
574
|
-
*
|
|
575
|
-
* Deliberately NOT solved by an entitlement gate. `runJs` is Business-gated
|
|
576
|
-
* because it is dangerous at any tier; this has to work on every plan,
|
|
577
|
-
* because a screen-reader user's access to a menu is not a paid feature.
|
|
578
|
-
*/ export const INTERACTION_ATTRIBUTE_NAME_PATTERN = /^(?:aria|data)-[a-z][a-z0-9-]*$/;
|
|
579
|
-
/**
|
|
580
|
-
* Whether an interaction is allowed to write this attribute name.
|
|
581
|
-
*
|
|
582
|
-
* Case-insensitive because HTML attribute names are, and a rejected name is
|
|
583
|
-
* a no-op rather than an error: a step that cannot run must not break the
|
|
584
|
-
* steps after it in the same automation.
|
|
585
|
-
*/ export function isInteractionAttributeAllowed(name) {
|
|
586
|
-
return typeof name === 'string' && INTERACTION_ATTRIBUTE_NAME_PATTERN.test(name.trim().toLowerCase());
|
|
587
|
-
}
|
|
588
340
|
export const HOST_ACTION_STEP_LABELS = {
|
|
589
341
|
runWorkflow: 'Run a workflow',
|
|
590
342
|
siteAlert: 'Show a site alert',
|
|
@@ -627,59 +379,6 @@ export const HOST_ACTION_STEP_LABELS = {
|
|
|
627
379
|
createCrmTask: 'Create a CRM task',
|
|
628
380
|
logCrmActivity: 'Log a CRM activity'
|
|
629
381
|
};
|
|
630
|
-
/**
|
|
631
|
-
* Past-tense phrases for a run summary (AGL-2171).
|
|
632
|
-
*
|
|
633
|
-
* `HOST_ACTION_STEP_LABELS` above names what a step WILL do, in the
|
|
634
|
-
* imperative, for a `Do` select — "Send an email". A run history is the
|
|
635
|
-
* opposite tense and a different audience: it says what already happened,
|
|
636
|
-
* on one line, several steps at a time. `/product/workflows` advertises
|
|
637
|
-
* exactly that shape — `Sent email · saved to Leads · webhook 200`.
|
|
638
|
-
*
|
|
639
|
-
* Two maps rather than one derived from the other, because "Send a webhook
|
|
640
|
-
* (Business)" cannot be mechanically turned into "webhook" — the plan
|
|
641
|
-
* suffix is part of the picker's label and has no business in a log line.
|
|
642
|
-
* Only the steps a SERVER run can perform appear here; the client-side
|
|
643
|
-
* steps run in the visitor's browser and never reach the activity write.
|
|
644
|
-
*/ export const HOST_ACTION_STEP_OUTCOMES = {
|
|
645
|
-
runWorkflow: 'ran workflow',
|
|
646
|
-
siteAlert: 'showed an alert',
|
|
647
|
-
customEvent: 'fired an event',
|
|
648
|
-
datasetAppend: 'saved to dataset',
|
|
649
|
-
updateDataset: 'updated dataset',
|
|
650
|
-
webhookPost: 'webhook',
|
|
651
|
-
sendEmail: 'sent email',
|
|
652
|
-
notifyAdmins: 'notified admins',
|
|
653
|
-
enrollList: 'enrolled in list',
|
|
654
|
-
assignCampaign: 'assigned to campaign',
|
|
655
|
-
wait: 'waiting',
|
|
656
|
-
waitForEvent: 'waiting for',
|
|
657
|
-
exitFlow: 'ended the flow',
|
|
658
|
-
setContactStage: 'set stage',
|
|
659
|
-
addContactTag: 'tagged',
|
|
660
|
-
assignContactOwner: 'assigned owner',
|
|
661
|
-
createCrmTask: 'created task',
|
|
662
|
-
logCrmActivity: 'logged activity'
|
|
663
|
-
};
|
|
664
|
-
/**
|
|
665
|
-
* One step's line in a run summary, with the detail that makes it useful.
|
|
666
|
-
*
|
|
667
|
-
* `saved to Leads` beats `saved to dataset`, and `webhook 200` beats
|
|
668
|
-
* `webhook` — the status code is the entire reason anyone opens a run
|
|
669
|
-
* history after a webhook, and it was being discarded on the line it
|
|
670
|
-
* arrived.
|
|
671
|
-
*/ export function describeStepOutcome(type, detail) {
|
|
672
|
-
var _HOST_ACTION_STEP_OUTCOMES_type;
|
|
673
|
-
const base = (_HOST_ACTION_STEP_OUTCOMES_type = HOST_ACTION_STEP_OUTCOMES[type]) != null ? _HOST_ACTION_STEP_OUTCOMES_type : String(type);
|
|
674
|
-
const trimmed = detail == null ? void 0 : detail.trim();
|
|
675
|
-
if (!trimmed) return base;
|
|
676
|
-
if (type === 'datasetAppend' || type === 'updateDataset') {
|
|
677
|
-
// `saved to dataset` + `Leads` reads as `saved to Leads`, not
|
|
678
|
-
// `saved to dataset Leads`.
|
|
679
|
-
return `${base.replace(/ dataset$/, '')} ${trimmed}`;
|
|
680
|
-
}
|
|
681
|
-
return `${base} ${trimmed}`;
|
|
682
|
-
}
|
|
683
382
|
/** A whole number of minutes inside the wait band. */ export function isFlowWaitMinutes(value) {
|
|
684
383
|
return Number.isInteger(value) && value >= FLOW_WAIT_MIN_MINUTES && value <= FLOW_WAIT_MAX_MINUTES;
|
|
685
384
|
}
|
|
@@ -690,342 +389,118 @@ export const HOST_ACTION_STEP_LABELS = {
|
|
|
690
389
|
* Validates an action doc shape; returns a human-readable error or null.
|
|
691
390
|
* Server and console share this so bad steps never persist or run.
|
|
692
391
|
*/ export function validateHostAction(action) {
|
|
693
|
-
var
|
|
694
|
-
var _action_name, _action_trigger_event, _action_trigger, _action_trigger_selector, _action_trigger1, _action_trigger2, _action_trigger3, _action_trigger4;
|
|
392
|
+
var _action_name;
|
|
695
393
|
if (!((_action_name = action.name) == null ? void 0 : _action_name.trim())) return 'Name the action';
|
|
696
394
|
// A stamp is provenance, and provenance naming a recipe that does not
|
|
697
395
|
// exist is a document nothing can read back; `null` and absent both pass.
|
|
698
396
|
if (action.recipe != null && !crmActionRecipe(action.recipe)) {
|
|
699
397
|
return 'Unknown recipe';
|
|
700
398
|
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
399
|
+
// The trigger, the step guards, the client steps and every declared step's
|
|
400
|
+
// pick are the platform's to check; the server steps are this module's.
|
|
401
|
+
return validateInteraction(action, {
|
|
402
|
+
validateStep: (step, label)=>serverStepProblem(step, label)
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* A server step's own complaint, or null. A `runWorkflow` step's pick is
|
|
407
|
+
* checked with every other declared step's (`interactionSteps` in
|
|
408
|
+
* `plugins.config.json`), by `validateInteraction`.
|
|
409
|
+
*/ function serverStepProblem(step, label) {
|
|
410
|
+
var _step_datasetId, _step_datasetName, _step_webhookId, _step_webhookName, _step_title, _step_listId, _step_listName, _step_datasetId1, _step_datasetName1, _step_campaignId, _step_campaignName;
|
|
411
|
+
if (step.type === 'wait' && !isFlowWaitMinutes(step.delayMinutes)) {
|
|
412
|
+
return `${label}: wait between ${FLOW_WAIT_MIN_MINUTES} minute and ${FLOW_WAIT_MAX_MINUTES} minutes`;
|
|
705
413
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
414
|
+
if (step.type === 'waitForEvent') {
|
|
415
|
+
var _ref;
|
|
416
|
+
var _step_eventName;
|
|
417
|
+
const waited = (_ref = (_step_eventName = step.eventName) == null ? void 0 : _step_eventName.trim()) != null ? _ref : '';
|
|
418
|
+
if (!waited || !HOST_EVENT_TYPES.includes(waited) && !isCustomEventName(waited)) {
|
|
419
|
+
return `${label}: pick the event to wait for`;
|
|
420
|
+
}
|
|
421
|
+
if (!isFlowWaitMinutes(step.timeoutMinutes)) {
|
|
422
|
+
return `${label}: give up after ${FLOW_WAIT_MIN_MINUTES}–${FLOW_WAIT_MAX_MINUTES} minutes`;
|
|
423
|
+
}
|
|
709
424
|
}
|
|
710
|
-
if (
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
425
|
+
if (step.type === 'customEvent') {
|
|
426
|
+
var _ref1;
|
|
427
|
+
var _step_eventName1;
|
|
428
|
+
if (!isCustomEventName((_ref1 = (_step_eventName1 = step.eventName) == null ? void 0 : _step_eventName1.trim()) != null ? _ref1 : '')) {
|
|
429
|
+
return `${label}: custom event names are 2–40 letters, digits, dashes`;
|
|
430
|
+
}
|
|
715
431
|
}
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
return 'Cooldown must be at least 1 minute';
|
|
432
|
+
if (step.type === 'datasetAppend' && !((_step_datasetId = step.datasetId) == null ? void 0 : _step_datasetId.trim()) && !((_step_datasetName = step.datasetName) == null ? void 0 : _step_datasetName.trim())) {
|
|
433
|
+
return `${label}: pick a dataset`;
|
|
719
434
|
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
if (combinator != null && !TRIGGER_COMBINATORS.includes(combinator)) {
|
|
723
|
-
return 'Combine conditions with AND or OR';
|
|
435
|
+
if (step.type === 'webhookPost' && !((_step_webhookId = step.webhookId) == null ? void 0 : _step_webhookId.trim()) && !((_step_webhookName = step.webhookName) == null ? void 0 : _step_webhookName.trim())) {
|
|
436
|
+
return `${label}: pick a webhook`;
|
|
724
437
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
438
|
+
if (step.type === 'sendEmail') {
|
|
439
|
+
var _step_subject, _step_body;
|
|
440
|
+
if (!((_step_subject = step.subject) == null ? void 0 : _step_subject.trim())) return `${label}: enter the subject`;
|
|
441
|
+
if (!((_step_body = step.body) == null ? void 0 : _step_body.trim())) return `${label}: enter the email body`;
|
|
728
442
|
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
// Single-condition messages stay exactly as AGL-557 shipped them;
|
|
732
|
-
// the row marker only appears once there are rows to tell apart.
|
|
733
|
-
const where = conditions.length > 1 ? ` (condition ${index + 1})` : '';
|
|
734
|
-
if (!TRIGGER_CONDITION_OPS.includes(condition.op)) {
|
|
735
|
-
return `Pick a condition operator${where}`;
|
|
736
|
-
}
|
|
737
|
-
if (!((_condition_field = condition.field) == null ? void 0 : _condition_field.trim())) {
|
|
738
|
-
return `Name the field the condition checks${where}`;
|
|
739
|
-
}
|
|
740
|
-
if (condition.op !== 'notEmpty' && !((_condition_value = condition.value) == null ? void 0 : _condition_value.trim())) {
|
|
741
|
-
return `Enter the value the condition compares against${where}`;
|
|
742
|
-
}
|
|
443
|
+
if (step.type === 'notifyAdmins' && !((_step_title = step.title) == null ? void 0 : _step_title.trim())) {
|
|
444
|
+
return `${label}: enter the notification title`;
|
|
743
445
|
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
if (steps.length > ACTION_MAX_STEPS) {
|
|
747
|
-
return `Actions are capped at ${ACTION_MAX_STEPS} steps`;
|
|
446
|
+
if (step.type === 'enrollList' && !((_step_listId = step.listId) == null ? void 0 : _step_listId.trim()) && !((_step_listName = step.listName) == null ? void 0 : _step_listName.trim())) {
|
|
447
|
+
return `${label}: pick a list`;
|
|
748
448
|
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
return `${label}: name the field the condition checks`;
|
|
769
|
-
}
|
|
770
|
-
if (clause.op !== 'notEmpty' && !((_clause_value = clause.value) == null ? void 0 : _clause_value.trim())) {
|
|
771
|
-
return `${label}: enter the value the condition compares against`;
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
if (step.type === 'wait' && !isFlowWaitMinutes(step.delayMinutes)) {
|
|
775
|
-
return `${label}: wait between ${FLOW_WAIT_MIN_MINUTES} minute and ${FLOW_WAIT_MAX_MINUTES} minutes`;
|
|
776
|
-
}
|
|
777
|
-
if (step.type === 'waitForEvent') {
|
|
778
|
-
var _ref2;
|
|
779
|
-
var _step_eventName;
|
|
780
|
-
const waited = (_ref2 = (_step_eventName = step.eventName) == null ? void 0 : _step_eventName.trim()) != null ? _ref2 : '';
|
|
781
|
-
if (!waited || !HOST_EVENT_TYPES.includes(waited) && !isCustomEventName(waited)) {
|
|
782
|
-
return `${label}: pick the event to wait for`;
|
|
783
|
-
}
|
|
784
|
-
if (!isFlowWaitMinutes(step.timeoutMinutes)) {
|
|
785
|
-
return `${label}: give up after ${FLOW_WAIT_MIN_MINUTES}–${FLOW_WAIT_MAX_MINUTES} minutes`;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
if (step.type === 'runWorkflow' && !((_step_workflowId = step.workflowId) == null ? void 0 : _step_workflowId.trim()) && !((_step_workflowName = step.workflowName) == null ? void 0 : _step_workflowName.trim())) {
|
|
789
|
-
return `${label}: pick a workflow`;
|
|
790
|
-
}
|
|
791
|
-
if (step.type === 'siteAlert' && !((_step_message = step.message) == null ? void 0 : _step_message.trim())) {
|
|
792
|
-
return `${label}: enter the alert message`;
|
|
793
|
-
}
|
|
794
|
-
if (step.type === 'customEvent') {
|
|
795
|
-
var _ref3;
|
|
796
|
-
var _step_eventName1;
|
|
797
|
-
if (!isCustomEventName((_ref3 = (_step_eventName1 = step.eventName) == null ? void 0 : _step_eventName1.trim()) != null ? _ref3 : '')) {
|
|
798
|
-
return `${label}: custom event names are 2–40 letters, digits, dashes`;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
if (step.type === 'datasetAppend' && !((_step_datasetId = step.datasetId) == null ? void 0 : _step_datasetId.trim()) && !((_step_datasetName = step.datasetName) == null ? void 0 : _step_datasetName.trim())) {
|
|
802
|
-
return `${label}: pick a dataset`;
|
|
803
|
-
}
|
|
804
|
-
if (step.type === 'webhookPost' && !((_step_webhookId = step.webhookId) == null ? void 0 : _step_webhookId.trim()) && !((_step_webhookName = step.webhookName) == null ? void 0 : _step_webhookName.trim())) {
|
|
805
|
-
return `${label}: pick a webhook`;
|
|
806
|
-
}
|
|
807
|
-
// Client + server steps (AGL-257).
|
|
808
|
-
if (step.type === 'addClass' || step.type === 'removeClass' || step.type === 'toggleClass') {
|
|
809
|
-
var _step_selector2, _step_className;
|
|
810
|
-
if (!((_step_selector2 = step.selector) == null ? void 0 : _step_selector2.trim())) return `${label}: enter a CSS selector`;
|
|
811
|
-
if (!((_step_className = step.className) == null ? void 0 : _step_className.trim())) return `${label}: enter the class name`;
|
|
812
|
-
}
|
|
813
|
-
// Element show/hide steps (AGL-562) always target a selector; drawer
|
|
814
|
-
// (AGL-562) and menu (AGL-568) commands may omit the target (the
|
|
815
|
-
// page's first drawer/menu answers).
|
|
816
|
-
if ((step.type === 'showElement' || step.type === 'hideElement' || step.type === 'toggleElement') && !((_step_selector = step.selector) == null ? void 0 : _step_selector.trim())) {
|
|
817
|
-
return `${label}: pick the element to show or hide`;
|
|
818
|
-
}
|
|
819
|
-
if (step.type === 'showElement' || step.type === 'hideElement' || step.type === 'toggleElement') {
|
|
820
|
-
// Choreography options (AGL-589).
|
|
821
|
-
const delay = step.delayMs;
|
|
822
|
-
if (delay != null && !(Number.isInteger(delay) && delay >= 0 && delay <= ELEMENT_VISIBILITY_MAX_DELAY_MS)) {
|
|
823
|
-
return `${label}: delay must be 0–${ELEMENT_VISIBILITY_MAX_DELAY_MS}ms`;
|
|
824
|
-
}
|
|
825
|
-
const dismiss = step.dismissOn;
|
|
826
|
-
if (dismiss != null && !(Array.isArray(dismiss) && dismiss.every((option)=>ELEMENT_DISMISS_OPTIONS.includes(option)))) {
|
|
827
|
-
return `${label}: dismiss options are escape and outsideClick`;
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
// One-target steps (AGL-2867). The runtime does nothing for a target it
|
|
831
|
-
// cannot find, so a missing one is refused here, where it can be fixed.
|
|
832
|
-
if (step.type === 'scrollTo') {
|
|
833
|
-
var _step_selector3;
|
|
834
|
-
if (!((_step_selector3 = step.selector) == null ? void 0 : _step_selector3.trim())) {
|
|
835
|
-
return `${label}: pick the element to scroll to`;
|
|
836
|
-
}
|
|
837
|
-
const behavior = step.behavior;
|
|
838
|
-
if (behavior != null && !SCROLL_TO_BEHAVIORS.includes(behavior)) {
|
|
839
|
-
return `${label}: scroll smoothly or instantly`;
|
|
840
|
-
}
|
|
841
|
-
const offset = step.offsetPx;
|
|
842
|
-
if (offset != null && !(Number.isInteger(offset) && offset >= 0 && offset <= SCROLL_TO_MAX_OFFSET_PX)) {
|
|
843
|
-
return `${label}: the offset must be 0–${SCROLL_TO_MAX_OFFSET_PX}px`;
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
if (step.type === 'playVideo' && !((_step_selector1 = step.selector) == null ? void 0 : _step_selector1.trim())) {
|
|
847
|
-
return `${label}: pick the video to play`;
|
|
848
|
-
}
|
|
849
|
-
if (step.type === 'showHtml') {
|
|
850
|
-
var _step_html;
|
|
851
|
-
if (!((_step_html = step.html) == null ? void 0 : _step_html.trim())) return `${label}: enter the HTML`;
|
|
852
|
-
// AGL-2486: the author-facing half of the runtime sanitizer, exactly as
|
|
853
|
-
// the reserved analytics name below is the author-facing half of the
|
|
854
|
-
// runtime refusal. `site-runtime.tsx` runs this HTML through
|
|
855
|
-
// `sanitizeAuthorHtml` for a VISITOR, where the only thing it can do
|
|
856
|
-
// with markup it refuses is drop it and say nothing — so an author who
|
|
857
|
-
// pastes an embed snippet gets a step that runs, reports success, and
|
|
858
|
-
// shows nothing. The refusal is reported HERE, where the person who
|
|
859
|
-
// can fix it is looking, and it is the SAME function that will run at
|
|
860
|
-
// render rather than a second description of its rules.
|
|
861
|
-
const removals = [];
|
|
862
|
-
const safe = sanitizeAuthorHtml(step.html, removals);
|
|
863
|
-
if (!safe.trim()) {
|
|
864
|
-
var _ref4;
|
|
865
|
-
var _removals_;
|
|
866
|
-
return `${label}: none of this HTML can be shown on a published page — ${(_ref4 = (_removals_ = removals[0]) == null ? void 0 : _removals_.message) != null ? _ref4 : 'it is removed by the sanitizer.'}`;
|
|
867
|
-
}
|
|
868
|
-
if (removals.length) {
|
|
869
|
-
return `${label}: ${removals[0].message}${removals.length > 1 ? ` (+${removals.length - 1} more)` : ''}`;
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
if (step.type === 'runJs' && !((_step_code = step.code) == null ? void 0 : _step_code.trim())) {
|
|
873
|
-
return `${label}: enter the JavaScript`;
|
|
874
|
-
}
|
|
875
|
-
if (step.type === 'redirect' && !((_step_url = step.url) == null ? void 0 : _step_url.trim()) && !step.screenId) {
|
|
876
|
-
return `${label}: pick a screen or enter the destination URL`;
|
|
877
|
-
}
|
|
878
|
-
if (step.type === 'trackGaEvent') {
|
|
879
|
-
var _step_params, _step_params1;
|
|
880
|
-
var _step_eventName2;
|
|
881
|
-
if (!((_step_eventName2 = step.eventName) == null ? void 0 : _step_eventName2.trim())) {
|
|
882
|
-
return `${label}: name the analytics event`;
|
|
883
|
-
}
|
|
884
|
-
// AGL-1587: the author-facing half of the runtime refusal. The runtime
|
|
885
|
-
// can only drop a bad name silently — it is executing for a VISITOR —
|
|
886
|
-
// so the name is checked HERE, where the person who can fix it is.
|
|
887
|
-
const resolved = resolveAuthoredEventName(step.eventName);
|
|
888
|
-
if (resolved.reason === 'reserved') {
|
|
889
|
-
return `${label}: "${step.eventName.trim()}" is a reserved analytics event name — pick another`;
|
|
890
|
-
}
|
|
891
|
-
if (!resolved.name) {
|
|
892
|
-
return `${label}: the analytics event name must start with a letter`;
|
|
893
|
-
}
|
|
894
|
-
const params = Object.entries((_step_params = step.params) != null ? _step_params : {});
|
|
895
|
-
if (params.length > ACTION_MAX_EVENT_PARAMS) {
|
|
896
|
-
return `${label}: analytics parameters are capped at ${ACTION_MAX_EVENT_PARAMS}`;
|
|
897
|
-
}
|
|
898
|
-
for (const [key, value] of params){
|
|
899
|
-
if (!key.trim()) return `${label}: name every analytics parameter`;
|
|
900
|
-
if (key.trim().length > ACTION_EVENT_PARAM_NAME_MAX_LENGTH) {
|
|
901
|
-
return `${label}: the "${key.trim().slice(0, 16)}…" parameter name is over ${ACTION_EVENT_PARAM_NAME_MAX_LENGTH} characters, which GA4 drops`;
|
|
902
|
-
}
|
|
903
|
-
if (!String(value != null ? value : '').trim()) {
|
|
904
|
-
return `${label}: enter a value for the "${key.trim()}" parameter`;
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
// The author-facing half of the runtime sanitizer, the same shape the
|
|
908
|
-
// reserved name above and the `showHtml` check take. `trackAuthoredEvent`
|
|
909
|
-
// strips a parameter that can carry personal data and says nothing about
|
|
910
|
-
// it, because it is executing for a VISITOR — so an author who binds a
|
|
911
|
-
// form field into a parameter gets a step that runs, reports success,
|
|
912
|
-
// and delivers an event missing the dimension it was created for. The
|
|
913
|
-
// strip is reported HERE, by running the REAL `sanitizeEventParams`
|
|
914
|
-
// rather than a second description of its rules, so the two can never
|
|
915
|
-
// disagree about which parameter survives.
|
|
916
|
-
const kept = sanitizeEventParams((_step_params1 = step.params) != null ? _step_params1 : undefined);
|
|
917
|
-
const stripped = params.find(([key])=>!(key in kept));
|
|
918
|
-
if (stripped) {
|
|
919
|
-
return `${label}: the "${stripped[0]}" parameter is never sent — an analytics parameter must not carry a visitor's own details`;
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
if (step.type === 'sendEmail') {
|
|
923
|
-
var _step_subject, _step_body;
|
|
924
|
-
if (!((_step_subject = step.subject) == null ? void 0 : _step_subject.trim())) return `${label}: enter the subject`;
|
|
925
|
-
if (!((_step_body = step.body) == null ? void 0 : _step_body.trim())) return `${label}: enter the email body`;
|
|
926
|
-
}
|
|
927
|
-
if (step.type === 'notifyAdmins' && !((_step_title = step.title) == null ? void 0 : _step_title.trim())) {
|
|
928
|
-
return `${label}: enter the notification title`;
|
|
929
|
-
}
|
|
930
|
-
if (step.type === 'showOverlay' && !((_step_overlayId = step.overlayId) == null ? void 0 : _step_overlayId.trim()) && !((_step_overlayName = step.overlayName) == null ? void 0 : _step_overlayName.trim())) {
|
|
931
|
-
return `${label}: pick an overlay`;
|
|
932
|
-
}
|
|
933
|
-
if (step.type === 'enrollList' && !((_step_listId = step.listId) == null ? void 0 : _step_listId.trim()) && !((_step_listName = step.listName) == null ? void 0 : _step_listName.trim())) {
|
|
934
|
-
return `${label}: pick a list`;
|
|
935
|
-
}
|
|
936
|
-
if (step.type === 'updateDataset' && !((_step_datasetId1 = step.datasetId) == null ? void 0 : _step_datasetId1.trim()) && !((_step_datasetName1 = step.datasetName) == null ? void 0 : _step_datasetName1.trim())) {
|
|
937
|
-
return `${label}: pick a dataset`;
|
|
938
|
-
}
|
|
939
|
-
if (step.type === 'assignCampaign' && !((_step_campaignId = step.campaignId) == null ? void 0 : _step_campaignId.trim()) && !((_step_campaignName = step.campaignName) == null ? void 0 : _step_campaignName.trim())) {
|
|
940
|
-
return `${label}: pick a campaign`;
|
|
941
|
-
}
|
|
942
|
-
// CRM steps (AGL-2605). A stage or a kind outside its vocabulary is
|
|
943
|
-
// refused here rather than stored: the executor treats the value as
|
|
944
|
-
// trusted and would write it into a facet every stage report counts.
|
|
945
|
-
if (step.type === 'setContactStage' && !isContactLifecycleStage(step.lifecycleStage)) {
|
|
946
|
-
return `${label}: pick a lifecycle stage`;
|
|
449
|
+
if (step.type === 'updateDataset' && !((_step_datasetId1 = step.datasetId) == null ? void 0 : _step_datasetId1.trim()) && !((_step_datasetName1 = step.datasetName) == null ? void 0 : _step_datasetName1.trim())) {
|
|
450
|
+
return `${label}: pick a dataset`;
|
|
451
|
+
}
|
|
452
|
+
if (step.type === 'assignCampaign' && !((_step_campaignId = step.campaignId) == null ? void 0 : _step_campaignId.trim()) && !((_step_campaignName = step.campaignName) == null ? void 0 : _step_campaignName.trim())) {
|
|
453
|
+
return `${label}: pick a campaign`;
|
|
454
|
+
}
|
|
455
|
+
// CRM steps (AGL-2605). A stage or a kind outside its vocabulary is
|
|
456
|
+
// refused here rather than stored: the executor treats the value as
|
|
457
|
+
// trusted and would write it into a facet every stage report counts.
|
|
458
|
+
if (step.type === 'setContactStage' && !isContactLifecycleStage(step.lifecycleStage)) {
|
|
459
|
+
return `${label}: pick a lifecycle stage`;
|
|
460
|
+
}
|
|
461
|
+
if (step.type === 'addContactTag') {
|
|
462
|
+
var _ref2;
|
|
463
|
+
var _step_tag;
|
|
464
|
+
const tag = (_ref2 = (_step_tag = step.tag) == null ? void 0 : _step_tag.trim()) != null ? _ref2 : '';
|
|
465
|
+
if (!tag) return `${label}: enter the tag`;
|
|
466
|
+
if (tag.length > CONTACT_TAG_MAX_LENGTH) {
|
|
467
|
+
return `${label}: tags are at most ${CONTACT_TAG_MAX_LENGTH} characters`;
|
|
947
468
|
}
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
return `${label}: tags are at most ${CONTACT_TAG_MAX_LENGTH} characters`;
|
|
955
|
-
}
|
|
469
|
+
}
|
|
470
|
+
if (step.type === 'assignContactOwner') {
|
|
471
|
+
var _step_ownerUid, _step_ownerEmail, _step_ownerUid1, _step_ownerEmail1;
|
|
472
|
+
const named = Boolean(((_step_ownerUid = step.ownerUid) == null ? void 0 : _step_ownerUid.trim()) || ((_step_ownerEmail = step.ownerEmail) == null ? void 0 : _step_ownerEmail.trim()));
|
|
473
|
+
if (step.roundRobin === true && named) {
|
|
474
|
+
return `${label}: pick round robin or a member, not both`;
|
|
956
475
|
}
|
|
957
|
-
if (step.
|
|
958
|
-
|
|
959
|
-
const named = Boolean(((_step_ownerUid = step.ownerUid) == null ? void 0 : _step_ownerUid.trim()) || ((_step_ownerEmail = step.ownerEmail) == null ? void 0 : _step_ownerEmail.trim()));
|
|
960
|
-
if (step.roundRobin === true && named) {
|
|
961
|
-
return `${label}: pick round robin or a member, not both`;
|
|
962
|
-
}
|
|
963
|
-
if (step.roundRobin !== true && !((_step_ownerUid1 = step.ownerUid) == null ? void 0 : _step_ownerUid1.trim()) && !((_step_ownerEmail1 = step.ownerEmail) == null ? void 0 : _step_ownerEmail1.trim().includes('@'))) {
|
|
964
|
-
return `${label}: enter the owner’s email address`;
|
|
965
|
-
}
|
|
476
|
+
if (step.roundRobin !== true && !((_step_ownerUid1 = step.ownerUid) == null ? void 0 : _step_ownerUid1.trim()) && !((_step_ownerEmail1 = step.ownerEmail) == null ? void 0 : _step_ownerEmail1.trim().includes('@'))) {
|
|
477
|
+
return `${label}: enter the owner’s email address`;
|
|
966
478
|
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
}
|
|
479
|
+
}
|
|
480
|
+
if (step.type === 'createCrmTask') {
|
|
481
|
+
var _ref3;
|
|
482
|
+
var _step_title1, _step_assigneeEmail;
|
|
483
|
+
if (!((_step_title1 = step.title) == null ? void 0 : _step_title1.trim())) return `${label}: give the task a title`;
|
|
484
|
+
if (!isCrmTaskKind(step.kind)) return `${label}: pick the kind of task`;
|
|
485
|
+
if (!Number.isInteger(step.dueInDays) || step.dueInDays < 0 || step.dueInDays > CRM_TASK_MAX_DUE_DAYS) {
|
|
486
|
+
return `${label}: due in 0–${CRM_TASK_MAX_DUE_DAYS} days`;
|
|
487
|
+
}
|
|
488
|
+
// Optional — but an address that is not one would resolve to nobody at
|
|
489
|
+
// run time, and the task would land unassigned with no word why.
|
|
490
|
+
const assigneeEmail = (_ref3 = (_step_assigneeEmail = step.assigneeEmail) == null ? void 0 : _step_assigneeEmail.trim()) != null ? _ref3 : '';
|
|
491
|
+
if (assigneeEmail && !assigneeEmail.includes('@')) {
|
|
492
|
+
return `${label}: enter the assignee’s email address`;
|
|
981
493
|
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
}
|
|
987
|
-
if (!((_step_body1 = step.body) == null ? void 0 : _step_body1.trim())) return `${label}: write what happened`;
|
|
494
|
+
}
|
|
495
|
+
if (step.type === 'logCrmActivity') {
|
|
496
|
+
var _step_body1;
|
|
497
|
+
if (!isCrmActivityKind(step.kind)) {
|
|
498
|
+
return `${label}: pick the kind of activity`;
|
|
988
499
|
}
|
|
500
|
+
if (!((_step_body1 = step.body) == null ? void 0 : _step_body1.trim())) return `${label}: write what happened`;
|
|
989
501
|
}
|
|
990
502
|
return null;
|
|
991
503
|
}
|
|
992
|
-
export const WEBHOOK_MAX_PER_HOST = 5;
|
|
993
|
-
/**
|
|
994
|
-
* How many LIVE action documents one host may hold (AGL-2266).
|
|
995
|
-
*
|
|
996
|
-
* `hosts/{hostId}/actions` was in NO exclusion list in
|
|
997
|
-
* `cloud/firebase-firestore.rules`, so the host catch-all's `allow create`
|
|
998
|
-
* granted it to any editor, client-direct, on any plan — and the import
|
|
999
|
-
* route's own table said so in as many words: *"no `RESOURCES` entry and no
|
|
1000
|
-
* quota key anywhere; all three creators write the document client-direct."*
|
|
1001
|
-
* A free org could therefore mint unbounded Firestore documents from the
|
|
1002
|
-
* browser against a $0 subscription. Unbounded infrastructure, not a bypass of
|
|
1003
|
-
* anything we sell, which is `WEBHOOK_MAX_PER_HOST`'s (AGL-1360) and
|
|
1004
|
-
* `NON_PAGE_SCREEN_MAX_PER_HOST`'s (AGL-1399) shape exactly: a flat PLATFORM
|
|
1005
|
-
* cap with no `OrgEntitlements` key, no variation by plan, and nothing on the
|
|
1006
|
-
* price list to explain.
|
|
1007
|
-
*
|
|
1008
|
-
* ## Not gated on the `actions` entitlement, deliberately
|
|
1009
|
-
*
|
|
1010
|
-
* `actions` is a Pro feature and `interactions` is free, and BOTH write this
|
|
1011
|
-
* collection — the interaction builder and the besigner's preset wiring create
|
|
1012
|
-
* the same document type the Pro actions card does. Gating creation on the
|
|
1013
|
-
* paid flag would take element interactions away from every free and starter
|
|
1014
|
-
* site, which is a pricing change wearing a cap's clothes. The runtime already
|
|
1015
|
-
* checks the entitlement where it decides what may RUN
|
|
1016
|
-
* (`run-event-actions.ts`), which is the right place for it.
|
|
1017
|
-
*
|
|
1018
|
-
* ## Why 500
|
|
1019
|
-
*
|
|
1020
|
-
* Sized to the busiest plausible site rather than to today's data. An action
|
|
1021
|
-
* is authored per interactive element, so a heavy marketing site with dropdown
|
|
1022
|
-
* choreography on every section reaches tens; presets wire a handful at a
|
|
1023
|
-
* time. 500 is far past anything authoring produces and well short of what a
|
|
1024
|
-
* script in a loop wants, which is the only property a flat cap needs. Live
|
|
1025
|
-
* documents only — the interactions provider soft-deletes with `deletedAt`, so
|
|
1026
|
-
* counting tombstones would be AGL-1173's bug one collection over, where
|
|
1027
|
-
* removing an interaction never frees its slot.
|
|
1028
|
-
*/ export const ACTIONS_MAX_PER_HOST = 500;
|
|
1029
|
-
/** Outbound URLs must be public https — first-line SSRF guard. */ export const WEBHOOK_URL_PATTERN = /^https:\/\/(?!localhost)(?!127\.)(?!0\.)(?!10\.)(?!172\.(1[6-9]|2\d|3[01])\.)(?!192\.168\.)(?!169\.254\.)[^\s]+$/i;
|
|
504
|
+
/** The most webhooks one site keeps; the site create route enforces it. */ export const WEBHOOK_MAX_PER_HOST = 5;
|
|
1030
505
|
|
|
1031
506
|
//# sourceMappingURL=actions.js.map
|