@aglyn/aglyn 1.0.0-beta.220 → 1.0.0-beta.222
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 +15 -11
- package/src/lib/app-utils/agent-openapi.js +1 -1
- package/src/lib/app-utils/agent-openapi.js.map +1 -1
- package/src/lib/app-utils/analytics-events.d.ts +3 -2
- package/src/lib/app-utils/analytics-events.js +3 -2
- package/src/lib/app-utils/analytics-events.js.map +1 -1
- package/src/lib/app-utils/api-plugins.d.ts +30 -0
- package/src/lib/app-utils/api-plugins.js +24 -1
- package/src/lib/app-utils/api-plugins.js.map +1 -1
- package/src/lib/app-utils/author-html.d.ts +1 -1
- package/src/lib/app-utils/author-html.js.map +1 -1
- package/src/lib/app-utils/bandwidth-cap.d.ts +12 -1
- package/src/lib/app-utils/bandwidth-cap.js +17 -1
- package/src/lib/app-utils/bandwidth-cap.js.map +1 -1
- package/src/lib/app-utils/compose-reusable-components.d.ts +19 -0
- package/src/lib/app-utils/compose-reusable-components.js +116 -26
- package/src/lib/app-utils/compose-reusable-components.js.map +1 -1
- package/src/lib/app-utils/console-routes.d.ts +4 -0
- package/src/lib/app-utils/console-routes.js +3 -0
- package/src/lib/app-utils/console-routes.js.map +1 -1
- package/src/lib/app-utils/contacts.d.ts +71 -0
- package/src/lib/app-utils/contacts.js +55 -0
- package/src/lib/app-utils/contacts.js.map +1 -1
- package/src/lib/app-utils/contexts.d.ts +1 -0
- package/src/lib/app-utils/contexts.js +1 -0
- package/src/lib/app-utils/contexts.js.map +1 -1
- package/src/lib/app-utils/crm-email-templates.js +21 -4
- package/src/lib/app-utils/crm-email-templates.js.map +1 -1
- package/src/lib/app-utils/crm-kinds.d.ts +2 -0
- package/src/lib/app-utils/crm-kinds.js +1 -0
- package/src/lib/app-utils/crm-kinds.js.map +1 -1
- package/src/lib/app-utils/crm.d.ts +1199 -67
- package/src/lib/app-utils/crm.js +1951 -310
- package/src/lib/app-utils/crm.js.map +1 -1
- package/src/lib/app-utils/csv-import.d.ts +10 -38
- package/src/lib/app-utils/csv-import.js +17 -42
- package/src/lib/app-utils/csv-import.js.map +1 -1
- package/src/lib/app-utils/csv.d.ts +32 -11
- package/src/lib/app-utils/csv.js +43 -5
- package/src/lib/app-utils/csv.js.map +1 -1
- package/src/lib/app-utils/default-site.d.ts +116 -0
- package/src/lib/app-utils/default-site.js +1024 -0
- package/src/lib/app-utils/default-site.js.map +1 -0
- package/src/lib/app-utils/docs-help.generated.d.ts +23 -23
- package/src/lib/app-utils/docs-help.generated.js +47 -10
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.js +746 -151
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/draft-placeholders.d.ts +76 -0
- package/src/lib/app-utils/draft-placeholders.js +115 -0
- package/src/lib/app-utils/draft-placeholders.js.map +1 -0
- package/src/lib/app-utils/entity-picker-context.d.ts +19 -15
- package/src/lib/app-utils/entity-picker-context.js +4 -4
- package/src/lib/app-utils/entity-picker-context.js.map +1 -1
- package/src/lib/app-utils/expand-repeatables.d.ts +66 -10
- package/src/lib/app-utils/expand-repeatables.js +88 -14
- package/src/lib/app-utils/expand-repeatables.js.map +1 -1
- package/src/lib/app-utils/forms.d.ts +33 -22
- package/src/lib/app-utils/forms.js +47 -28
- package/src/lib/app-utils/forms.js.map +1 -1
- package/src/lib/app-utils/full-use-cost.d.ts +277 -0
- package/src/lib/app-utils/full-use-cost.js +421 -0
- package/src/lib/app-utils/full-use-cost.js.map +1 -0
- package/src/lib/app-utils/health-report.js +33 -0
- package/src/lib/app-utils/health-report.js.map +1 -1
- package/src/lib/app-utils/leaving-notice.d.ts +96 -0
- package/src/lib/app-utils/leaving-notice.js +157 -0
- package/src/lib/app-utils/leaving-notice.js.map +1 -0
- package/src/lib/app-utils/llms-txt.d.ts +20 -0
- package/src/lib/app-utils/llms-txt.js +7 -1
- package/src/lib/app-utils/llms-txt.js.map +1 -1
- package/src/lib/app-utils/media-asset-facts.d.ts +16 -1
- package/src/lib/app-utils/media-asset-facts.js +40 -13
- package/src/lib/app-utils/media-asset-facts.js.map +1 -1
- package/src/lib/app-utils/media-bandwidth.d.ts +52 -0
- package/src/lib/app-utils/media-bandwidth.js +94 -0
- package/src/lib/app-utils/media-bandwidth.js.map +1 -0
- package/src/lib/app-utils/media-ref.d.ts +241 -33
- package/src/lib/app-utils/media-ref.js +324 -43
- package/src/lib/app-utils/media-ref.js.map +1 -1
- package/src/lib/app-utils/media-src.d.ts +8 -8
- package/src/lib/app-utils/media-src.js +27 -11
- package/src/lib/app-utils/media-src.js.map +1 -1
- package/src/lib/app-utils/media-takedown-reach.d.ts +4 -1
- package/src/lib/app-utils/media-takedown-reach.js +6 -3
- package/src/lib/app-utils/media-takedown-reach.js.map +1 -1
- package/src/lib/app-utils/notifications.d.ts +1 -1
- package/src/lib/app-utils/notifications.js +2 -0
- package/src/lib/app-utils/notifications.js.map +1 -1
- package/src/lib/app-utils/operator-alerts.js +17 -0
- package/src/lib/app-utils/operator-alerts.js.map +1 -1
- package/src/lib/app-utils/organizations.d.ts +51 -2
- package/src/lib/app-utils/organizations.js +56 -3
- package/src/lib/app-utils/organizations.js.map +1 -1
- package/src/lib/app-utils/page-record-sources.d.ts +87 -0
- package/src/lib/app-utils/page-record-sources.js +53 -0
- package/src/lib/app-utils/page-record-sources.js.map +1 -0
- package/src/lib/app-utils/paid-media-source.d.ts +3 -7
- package/src/lib/app-utils/paid-media-source.js +5 -19
- package/src/lib/app-utils/paid-media-source.js.map +1 -1
- package/src/lib/app-utils/person-erasure.d.ts +5 -2
- package/src/lib/app-utils/person-erasure.js.map +1 -1
- package/src/lib/app-utils/picklists.d.ts +187 -0
- package/src/lib/app-utils/picklists.js +320 -0
- package/src/lib/app-utils/picklists.js.map +1 -0
- package/src/lib/app-utils/plan-entitlements.d.ts +220 -50
- package/src/lib/app-utils/plan-entitlements.js +309 -115
- package/src/lib/app-utils/plan-entitlements.js.map +1 -1
- 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 +1 -1
- package/src/lib/app-utils/release-flags.js +11 -0
- package/src/lib/app-utils/release-flags.js.map +1 -1
- package/src/lib/app-utils/rendered-widths.d.ts +121 -0
- package/src/lib/app-utils/rendered-widths.js +211 -0
- package/src/lib/app-utils/rendered-widths.js.map +1 -0
- package/src/lib/app-utils/repeat-sources.d.ts +2 -1
- package/src/lib/app-utils/repeat-sources.js.map +1 -1
- package/src/lib/app-utils/screen-link-context-value.d.ts +7 -0
- package/src/lib/app-utils/screen-link-context-value.js.map +1 -1
- package/src/lib/app-utils/screen-link-context.js +14 -2
- package/src/lib/app-utils/screen-link-context.js.map +1 -1
- package/src/lib/app-utils/screen-route.d.ts +157 -36
- package/src/lib/app-utils/screen-route.js +191 -41
- package/src/lib/app-utils/screen-route.js.map +1 -1
- package/src/lib/app-utils/seo-audit.d.ts +11 -1
- package/src/lib/app-utils/seo-audit.js +33 -13
- package/src/lib/app-utils/seo-audit.js.map +1 -1
- package/src/lib/app-utils/seo-keywords.d.ts +11 -0
- package/src/lib/app-utils/seo-keywords.js +19 -5
- package/src/lib/app-utils/seo-keywords.js.map +1 -1
- package/src/lib/app-utils/seo-page-facts.d.ts +47 -4
- package/src/lib/app-utils/seo-page-facts.js +136 -31
- package/src/lib/app-utils/seo-page-facts.js.map +1 -1
- package/src/lib/app-utils/seo-site-scan.d.ts +42 -4
- package/src/lib/app-utils/seo-site-scan.js +113 -12
- package/src/lib/app-utils/seo-site-scan.js.map +1 -1
- package/src/lib/app-utils/server.d.ts +5 -4
- package/src/lib/app-utils/server.js +14 -5
- package/src/lib/app-utils/server.js.map +1 -1
- package/src/lib/app-utils/site-icon-set.d.ts +195 -0
- package/src/lib/app-utils/site-icon-set.js +351 -0
- package/src/lib/app-utils/site-icon-set.js.map +1 -0
- package/src/lib/app-utils/site-interactions.d.ts +101 -4
- package/src/lib/app-utils/site-interactions.js +120 -4
- package/src/lib/app-utils/site-interactions.js.map +1 -1
- package/src/lib/app-utils/starter-template-nodes.d.ts +7 -0
- package/src/lib/app-utils/starter-template-nodes.js +3 -0
- package/src/lib/app-utils/starter-template-nodes.js.map +1 -1
- package/src/lib/app-utils/starter-templates.d.ts +5 -19
- package/src/lib/app-utils/starter-templates.js +5 -49
- package/src/lib/app-utils/starter-templates.js.map +1 -1
- package/src/lib/app-utils/transfer-launcher-context.d.ts +136 -0
- package/src/lib/app-utils/transfer-launcher-context.js +23 -0
- package/src/lib/app-utils/transfer-launcher-context.js.map +1 -0
- package/src/lib/app-utils/transfer-resume-import.d.ts +39 -0
- package/src/lib/app-utils/transfer-resume-import.js +128 -0
- package/src/lib/app-utils/transfer-resume-import.js.map +1 -0
- package/src/lib/app-utils/upgrade-proposal.d.ts +66 -0
- package/src/lib/app-utils/upgrade-proposal.js +95 -0
- package/src/lib/app-utils/upgrade-proposal.js.map +1 -0
- package/src/lib/app-utils/utc-month.d.ts +33 -0
- package/src/lib/app-utils/utc-month.js +35 -0
- package/src/lib/app-utils/utc-month.js.map +1 -0
- package/src/lib/app-utils/visitor-record-ceiling.d.ts +4 -4
- package/src/lib/app-utils/visitor-record-ceiling.js +4 -4
- package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -1
- package/src/lib/app-utils/wire-nodes.d.ts +39 -19
- package/src/lib/app-utils/wire-nodes.js +120 -34
- package/src/lib/app-utils/wire-nodes.js.map +1 -1
- package/src/lib/data-transfer/access.d.ts +74 -0
- package/src/lib/data-transfer/access.js +93 -0
- package/src/lib/data-transfer/access.js.map +1 -0
- package/src/lib/data-transfer/derive.d.ts +246 -0
- package/src/lib/data-transfer/derive.js +1007 -0
- package/src/lib/data-transfer/derive.js.map +1 -0
- package/src/lib/data-transfer/export-file.d.ts +46 -0
- package/src/lib/data-transfer/export-file.js +146 -0
- package/src/lib/data-transfer/export-file.js.map +1 -0
- package/src/lib/data-transfer/field-catalog.d.ts +134 -0
- package/src/lib/data-transfer/field-catalog.js +278 -0
- package/src/lib/data-transfer/field-catalog.js.map +1 -0
- package/src/lib/data-transfer/header-match.d.ts +129 -0
- package/src/lib/data-transfer/header-match.js +367 -0
- package/src/lib/data-transfer/header-match.js.map +1 -0
- package/src/lib/data-transfer/index.d.ts +34 -0
- package/src/lib/data-transfer/index.js +40 -0
- package/src/lib/data-transfer/index.js.map +1 -0
- package/src/lib/data-transfer/job.d.ts +190 -0
- package/src/lib/data-transfer/job.js +229 -0
- package/src/lib/data-transfer/job.js.map +1 -0
- package/src/lib/data-transfer/lookup.d.ts +45 -0
- package/src/lib/data-transfer/lookup.js +71 -0
- package/src/lib/data-transfer/lookup.js.map +1 -0
- package/src/lib/data-transfer/match.d.ts +99 -0
- package/src/lib/data-transfer/match.js +244 -0
- package/src/lib/data-transfer/match.js.map +1 -0
- package/src/lib/data-transfer/package-plan.d.ts +205 -0
- package/src/lib/data-transfer/package-plan.js +475 -0
- package/src/lib/data-transfer/package-plan.js.map +1 -0
- package/src/lib/data-transfer/package.d.ts +181 -0
- package/src/lib/data-transfer/package.js +426 -0
- package/src/lib/data-transfer/package.js.map +1 -0
- package/src/lib/data-transfer/picklist-map.d.ts +139 -0
- package/src/lib/data-transfer/picklist-map.js +271 -0
- package/src/lib/data-transfer/picklist-map.js.map +1 -0
- package/src/lib/data-transfer/plan.d.ts +176 -0
- package/src/lib/data-transfer/plan.js +451 -0
- package/src/lib/data-transfer/plan.js.map +1 -0
- package/src/lib/data-transfer/policy.d.ts +170 -0
- package/src/lib/data-transfer/policy.js +378 -0
- package/src/lib/data-transfer/policy.js.map +1 -0
- package/src/lib/data-transfer/resource.d.ts +211 -0
- package/src/lib/data-transfer/resource.js +241 -0
- package/src/lib/data-transfer/resource.js.map +1 -0
- package/src/lib/data-transfer/review.d.ts +70 -0
- package/src/lib/data-transfer/review.js +233 -0
- package/src/lib/data-transfer/review.js.map +1 -0
- package/src/lib/data-transfer/similarity.d.ts +40 -0
- package/src/lib/data-transfer/similarity.js +106 -0
- package/src/lib/data-transfer/similarity.js.map +1 -0
- package/src/lib/data-transfer/site-package.d.ts +365 -0
- package/src/lib/data-transfer/site-package.js +1077 -0
- package/src/lib/data-transfer/site-package.js.map +1 -0
- package/src/lib/data-transfer/source.d.ts +74 -0
- package/src/lib/data-transfer/source.js +293 -0
- package/src/lib/data-transfer/source.js.map +1 -0
- package/src/lib/data-transfer/transfer-api.d.ts +898 -0
- package/src/lib/data-transfer/transfer-api.js +107 -0
- package/src/lib/data-transfer/transfer-api.js.map +1 -0
- package/src/lib/foundation/definitions/org-billing.types.d.ts +31 -0
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
- package/src/lib/foundation/definitions/organization.types.d.ts +42 -1
- package/src/lib/foundation/definitions/organization.types.js.map +1 -1
- package/src/lib/foundation/definitions/platform.types.d.ts +6 -4
- package/src/lib/foundation/definitions/platform.types.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/feature-plugins.d.ts +91 -2
- package/src/lib/plugin-manager/feature-plugins.js +48 -3
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +56 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js +1132 -27
- 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/interaction-recipes.d.ts +142 -0
- package/src/lib/plugin-manager/interaction-recipes.js +104 -0
- package/src/lib/plugin-manager/interaction-recipes.js.map +1 -0
- package/src/lib/plugin-manager/interaction-step-checks.d.ts +66 -0
- package/src/lib/plugin-manager/interaction-step-checks.js +86 -0
- package/src/lib/plugin-manager/interaction-step-checks.js.map +1 -0
- package/src/lib/plugin-manager/plugin-artifact-types.d.ts +235 -0
- package/src/lib/plugin-manager/plugin-artifact-types.js +99 -0
- package/src/lib/plugin-manager/plugin-artifact-types.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contact-capture.d.ts +8 -0
- package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -1
- package/src/lib/plugin-manager/plugin-conversion-credit.d.ts +216 -0
- package/src/lib/plugin-manager/plugin-conversion-credit.js +91 -0
- package/src/lib/plugin-manager/plugin-conversion-credit.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.d.ts +83 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.js +87 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.js.map +1 -0
- package/src/lib/plugin-manager/plugin-host-resources.d.ts +6 -0
- package/src/lib/plugin-manager/plugin-host-resources.js +6 -1
- package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -1
- package/src/lib/plugin-manager/plugin-intake-gates.d.ts +75 -0
- package/src/lib/plugin-manager/plugin-intake-gates.js +49 -0
- package/src/lib/plugin-manager/plugin-intake-gates.js.map +1 -0
- package/src/lib/plugin-manager/plugin-jobs.d.ts +5 -5
- package/src/lib/plugin-manager/plugin-jobs.js +7 -7
- package/src/lib/plugin-manager/plugin-jobs.js.map +1 -1
- package/src/lib/plugin-manager/plugin-live-paths.d.ts +70 -0
- package/src/lib/plugin-manager/plugin-live-paths.js +66 -0
- package/src/lib/plugin-manager/plugin-live-paths.js.map +1 -0
- package/src/lib/plugin-manager/plugin-org-erasure.d.ts +3 -2
- package/src/lib/plugin-manager/plugin-org-erasure.js +30 -5
- package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-person-erasure.d.ts +68 -9
- package/src/lib/plugin-manager/plugin-person-erasure.js +196 -51
- package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-person-records.d.ts +275 -0
- package/src/lib/plugin-manager/plugin-person-records.js +107 -0
- package/src/lib/plugin-manager/plugin-person-records.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-counts.d.ts +76 -0
- package/src/lib/plugin-manager/plugin-record-counts.js +49 -0
- package/src/lib/plugin-manager/plugin-record-counts.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-email-state.d.ts +26 -0
- package/src/lib/plugin-manager/plugin-record-email-state.js +16 -0
- package/src/lib/plugin-manager/plugin-record-email-state.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-index.d.ts +10 -0
- package/src/lib/plugin-manager/plugin-record-index.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-lists.d.ts +86 -6
- package/src/lib/plugin-manager/plugin-record-lists.js +42 -5
- package/src/lib/plugin-manager/plugin-record-lists.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-origin.d.ts +79 -0
- package/src/lib/plugin-manager/plugin-record-origin.js +46 -0
- package/src/lib/plugin-manager/plugin-record-origin.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-pages.d.ts +37 -0
- package/src/lib/plugin-manager/plugin-record-pages.js +52 -0
- package/src/lib/plugin-manager/plugin-record-pages.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-timeline.d.ts +60 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js +16 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -1
- package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +5 -5
- package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -1
- package/src/lib/plugin-manager/plugin-revocations.d.ts +64 -0
- package/src/lib/plugin-manager/plugin-revocations.js +47 -0
- package/src/lib/plugin-manager/plugin-revocations.js.map +1 -0
- package/src/lib/plugin-manager/plugin-send-tallies.d.ts +69 -0
- package/src/lib/plugin-manager/plugin-send-tallies.js +45 -0
- package/src/lib/plugin-manager/plugin-send-tallies.js.map +1 -0
- package/src/lib/plugin-manager/plugin-server-steps.d.ts +170 -0
- package/src/lib/plugin-manager/plugin-server-steps.js +116 -0
- package/src/lib/plugin-manager/plugin-server-steps.js.map +1 -0
- package/src/lib/plugin-manager/plugin-site-bundle.d.ts +40 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js +4 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -1
- package/src/lib/plugin-manager/plugin-site-export.d.ts +57 -1
- package/src/lib/plugin-manager/plugin-site-export.js +23 -10
- package/src/lib/plugin-manager/plugin-site-export.js.map +1 -1
- package/src/lib/plugin-manager/plugin-sitemap-readers.d.ts +146 -0
- package/src/lib/plugin-manager/plugin-sitemap-readers.js +110 -0
- package/src/lib/plugin-manager/plugin-sitemap-readers.js.map +1 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.d.ts +714 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.js +443 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-usage-axes.d.ts +54 -5
- package/src/lib/plugin-manager/plugin-usage-axes.js +11 -3
- package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -1
- package/src/lib/plugin-manager/plugin-user-erasure.js +9 -1
- package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-visitor-doors.d.ts +104 -0
- package/src/lib/plugin-manager/plugin-visitor-doors.js +108 -0
- package/src/lib/plugin-manager/plugin-visitor-doors.js.map +1 -0
- 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/repeat-rows.d.ts +5 -6
- package/src/lib/plugin-manager/repeat-rows.js.map +1 -1
- package/src/lib/app-utils/actions.d.ts +0 -310
- package/src/lib/app-utils/actions.js +0 -506
- package/src/lib/app-utils/actions.js.map +0 -1
- package/src/lib/app-utils/automation-placeholders.d.ts +0 -72
- package/src/lib/app-utils/automation-placeholders.js +0 -207
- package/src/lib/app-utils/automation-placeholders.js.map +0 -1
- package/src/lib/app-utils/dataset-models.d.ts +0 -339
- package/src/lib/app-utils/dataset-models.js +0 -722
- package/src/lib/app-utils/dataset-models.js.map +0 -1
- package/src/lib/app-utils/datasets.d.ts +0 -171
- package/src/lib/app-utils/datasets.js +0 -227
- package/src/lib/app-utils/datasets.js.map +0 -1
- package/src/lib/app-utils/form-abuse-ceiling.d.ts +0 -146
- package/src/lib/app-utils/form-abuse-ceiling.js +0 -158
- package/src/lib/app-utils/form-abuse-ceiling.js.map +0 -1
- package/src/lib/plugin-manager/order-fulfilment.d.ts +0 -142
- package/src/lib/plugin-manager/order-fulfilment.js +0 -104
- package/src/lib/plugin-manager/order-fulfilment.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/repeat-rows.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { RepeatableDataset } from '../app-utils/expand-repeatables'\nimport { getRegisteringPluginId } from '../app-utils/registering-plugin'\nimport { PLUGIN_REPEAT_SOURCE_DECLARED } from './first-party-plugins.generated'\nimport { runPluginDeclarationsRepair } from './plugin-declarations-repair'\n\n/**\n * WHERE A PUBLISHED PAGE'S REPEATED ROWS COME FROM (AGL-3080).\n *\n * Any element can repeat, and the platform decides what a repeat MEANS — the\n * scope, the copies, the filter, the bound (`expand-repeatables.ts`). What it\n * does not decide is where the rows live. That is the plugin's that keeps\n * them, and the composition that renders a published page asks it here, with\n * the keys the page's tree repeats over, and never reads a collection itself.\n *\n * `repeat-sources.ts` is the editor's side of the same line: a hook the\n * besigner's canvas mounts to preview the rows. This is the server's side,\n * read once per compose, and it is a different registry because its readers\n * are different processes with different failure costs.\n *\n * ## Declared, then registered — and an absent reader is refused\n *\n * The reader is registered from the owning plugin's `serverDeclarations`\n * entry, which every app runs at boot, so every process that composes a page\n * has it before the first request. But a registry is only safe where an empty\n * one cannot be mistaken for an answer, and here it can: a page whose repeat\n * found no reader would render the template once where the author put a list,\n * and nothing anywhere would be red. That is the AGL-3025 shape on the most\n * public surface the product has.\n *\n * So the plugin that answers also DECLARES that it does, in\n * `plugins.config.json` (`repeatSource`), and the generator compiles that into\n * core. The two together tell the one case that is a real answer from the one\n * that is a broken boot:\n *\n * - nothing declared — this deployment ships no plugin that keeps rows, and a\n * repeat renders its element once, as written, exactly as a key naming\n * nothing does;\n * - declared and registered — the reader answers;\n * - declared and NOT registered — the boot failed. The app's declarations\n * step is run again ({@link runPluginDeclarationsRepair}); if the reader is\n * still missing, {@link readRepeatRows} THROWS. A render that throws keeps\n * the page it last rendered in the cache and is loud in the logs, which is\n * the right way round for a page that would otherwise go out wrong.\n *\n * Per-key failures are the reader's to absorb, as they always were: a deleted\n * or unreadable entry leaves its element rendering once and costs the page\n * nothing else.\n *\n * Reached by path, never through a barrel: only the server composition asks.\n */\n\n/** One composition's question: the keys a page's tree repeats over. */\nexport interface RepeatRowsRequest {\n /** The site being rendered. A reader answers only what that site may see. */\n hostId: string\n /**\n * The keys exactly as the nodes store them (`repeatKeys`), trimmed,\n * sorted and without repeats.\n */\n keys: readonly string[]\n}\n\n/**\n * The rows for a request, under every key the expansion looks them up by: the\n * key as the node stores it, the entry's own id, and each entry a one-hop\n * reference in the rows reads. A key with nothing to render is absent.\n */\nexport type RepeatRowsAnswer = Record<string, RepeatableDataset>\n\n/** Answers one composition's request. Never rejects for a single bad key. */\nexport type RepeatRowReader = (\n request: RepeatRowsRequest,\n) => Promise<RepeatRowsAnswer>\n\n/** The compiled declaration: which plugin answers, under which source id. */\nexport interface RepeatSourceDeclaration {\n pluginId: string\n /** The same id the plugin's editor source (`repeat-sources.ts`) uses. */\n id: string\n}\n\n/** The plugin declared to answer repeats, or `null` when none is. */\nexport function declaredRepeatSource(): RepeatSourceDeclaration | null {\n return PLUGIN_REPEAT_SOURCE_DECLARED\n}\n\ninterface RegisteredReader {\n pluginId: string\n reader: RepeatRowReader\n}\n\n/**\n * One table per process, on `globalThis` (AGL-3412): the app registers from\n * `instrumentation.ts`, which Next compiles apart from the routes that read,\n * and a module-scoped map would be filled in one copy and read empty in the\n * other — the exact failure this module exists to refuse.\n */\nconst READERS_KEY = Symbol.for('@aglyn/aglyn:repeat-row-readers')\n\nconst globalScope = globalThis as typeof globalThis & {\n [READERS_KEY]?: Map<string, RegisteredReader>\n}\n\nconst readers: Map<string, RegisteredReader> =\n globalScope[READERS_KEY] ?? (globalScope[READERS_KEY] = new Map())\n\n/**\n * Registers the reader for a source. Returns the unregister, which removes it\n * only while it is still the one registered.\n *\n * The owner is the plugin whose register fn is running, or the `pluginId`\n * passed for a boot declaration, where the loader's marker is not set. A\n * registration with neither is refused, and so is one from a plugin other\n * than the one the declaration names — two readers for one source would each\n * answer for the other's rows. The same plugin registering again replaces its\n * reader (a second surface, a repeated boot).\n */\nexport function registerRepeatRowReader(\n sourceId: string,\n reader: RepeatRowReader,\n options?: { pluginId?: string },\n): () => void {\n const id = sourceId.trim()\n const pluginId = (getRegisteringPluginId() ?? options?.pluginId ?? '').trim()\n if (!id) throw new Error('a repeat row reader needs a source id')\n if (!pluginId) {\n throw new Error(\n `repeat row reader \"${id}\" registered with no owner: pass { pluginId } ` +\n 'when registering outside a plugin register fn',\n )\n }\n const declared = declaredRepeatSource()\n if (declared?.id === id && declared.pluginId !== pluginId) {\n throw new Error(\n `repeat source \"${id}\" is declared by \"${declared.pluginId}\"; ` +\n `refused a reader from \"${pluginId}\"`,\n )\n }\n const held = readers.get(id)\n if (held && held.pluginId !== pluginId) {\n throw new Error(\n `repeat source \"${id}\" already has a reader from \"${held.pluginId}\"; ` +\n `refused \"${pluginId}\"`,\n )\n }\n const entry: RegisteredReader = { pluginId, reader }\n readers.set(id, entry)\n return () => {\n if (readers.get(id) === entry) readers.delete(id)\n }\n}\n\n/** The reader registered for a source, with its owner, or `null`. */\nexport function repeatRowReader(sourceId: string): RegisteredReader | null {\n return readers.get(sourceId) ?? null\n}\n\n/** Only for specs: forgets every registered reader. */\nexport function resetRepeatRowReadersForTests(): void {\n readers.clear()\n}\n\n/**\n * The declared source's reader was not registered, even after the app's\n * declarations step ran again. Thrown, never answered: see the module note.\n */\nexport class RepeatRowsUnavailableError extends Error {\n constructor(readonly source: RepeatSourceDeclaration) {\n super(\n `repeat source \"${source.id}\" is declared by \"${source.pluginId}\" but ` +\n 'no reader is registered in this process — its server declarations ' +\n 'did not run. Refusing to render repeats as if they had no rows.',\n )\n this.name = 'RepeatRowsUnavailableError'\n }\n}\n\n/**\n * The rows a composition's repeats render. See the module note for what each\n * of the three cases answers; with no keys it answers `{}` and asks nobody.\n */\nexport async function readRepeatRows(\n request: RepeatRowsRequest,\n): Promise<RepeatRowsAnswer> {\n const keys = [\n ...new Set(request.keys.map((key) => key.trim()).filter(Boolean)),\n ].sort()\n if (!keys.length) return {}\n const declared = declaredRepeatSource()\n if (!declared) return {}\n let registered = readers.get(declared.id)\n if (!registered) {\n try {\n await runPluginDeclarationsRepair()\n } catch (error) {\n console.error('[repeat-rows] the declarations repair failed', error)\n }\n registered = readers.get(declared.id)\n }\n if (!registered) throw new RepeatRowsUnavailableError(declared)\n return registered.reader({ hostId: request.hostId, keys })\n}\n"],"names":["globalScope","getRegisteringPluginId","PLUGIN_REPEAT_SOURCE_DECLARED","runPluginDeclarationsRepair","declaredRepeatSource","READERS_KEY","Symbol","for","globalThis","readers","Map","registerRepeatRowReader","sourceId","reader","options","id","trim","pluginId","Error","declared","held","get","entry","set","delete","repeatRowReader","resetRepeatRowReadersForTests","clear","RepeatRowsUnavailableError","source","name","readRepeatRows","request","keys","Set","map","key","filter","Boolean","sort","length","registered","error","console","hostId"],"mappings":"A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AM;QAAEX;IAAK;AAC1D"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/repeat-rows.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { RepeatableDataset } from '../app-utils/expand-repeatables'\nimport { getRegisteringPluginId } from '../app-utils/registering-plugin'\nimport { PLUGIN_REPEAT_SOURCE_DECLARED } from './first-party-plugins.generated'\nimport { runPluginDeclarationsRepair } from './plugin-declarations-repair'\n\n/**\n * WHERE A PUBLISHED PAGE'S REPEATED ROWS COME FROM (AGL-3080).\n *\n * Any element can repeat, and the platform decides what a repeat MEANS — the\n * scope, the copies, the filter, the bound (`expand-repeatables.ts`). What it\n * does not decide is where the rows live. That is the plugin's that keeps\n * them, and the composition that renders a published page asks it here, with\n * the keys the page's tree repeats over, and never reads a collection itself.\n *\n * `repeat-sources.ts` is the editor's side of the same line: a hook the\n * besigner's canvas mounts to preview the rows. This is the server's side,\n * read once per compose, and it is a different registry because its readers\n * are different processes with different failure costs.\n *\n * ## Declared, then registered — and an absent reader is refused\n *\n * The reader is registered from the owning plugin's `serverDeclarations`\n * entry, which every app runs at boot, so every process that composes a page\n * has it before the first request. But a registry is only safe where an empty\n * one cannot be mistaken for an answer, and here it can: a page whose repeat\n * found no reader would render no copies where the author put a list, and\n * nothing anywhere would be red. That is the AGL-3025 shape on the most\n * public surface the product has.\n *\n * So the plugin that answers also DECLARES that it does, in\n * `plugins.config.json` (`repeatSource`), and the generator compiles that into\n * core. The two together tell the one case that is a real answer from the one\n * that is a broken boot:\n *\n * - nothing declared — this deployment ships no plugin that keeps rows, and a\n * repeat renders no copies, exactly as a key naming nothing does (AGL-3496);\n * - declared and registered — the reader answers;\n * - declared and NOT registered — the boot failed. The app's declarations\n * step is run again ({@link runPluginDeclarationsRepair}); if the reader is\n * still missing, {@link readRepeatRows} THROWS. A render that throws keeps\n * the page it last rendered in the cache and is loud in the logs, which is\n * the right way round for a page that would otherwise go out wrong.\n *\n * Per-key failures are the reader's to absorb, as they always were: a deleted\n * or unreadable entry renders no copies of its element (AGL-3496) — never its\n * raw `{{item.*}}` template — and costs the page nothing else.\n *\n * Reached by path, never through a barrel: only the server composition asks.\n */\n\n/** One composition's question: the keys a page's tree repeats over. */\nexport interface RepeatRowsRequest {\n /** The site being rendered. A reader answers only what that site may see. */\n hostId: string\n /**\n * The keys exactly as the nodes store them (`repeatKeys`), trimmed,\n * sorted and without repeats.\n */\n keys: readonly string[]\n}\n\n/**\n * The rows for a request, under every key the expansion looks them up by: the\n * key as the node stores it, the entry's own id, and each entry a one-hop\n * reference in the rows reads. A key with nothing to render is absent.\n */\nexport type RepeatRowsAnswer = Record<string, RepeatableDataset>\n\n/** Answers one composition's request. Never rejects for a single bad key. */\nexport type RepeatRowReader = (\n request: RepeatRowsRequest,\n) => Promise<RepeatRowsAnswer>\n\n/** The compiled declaration: which plugin answers, under which source id. */\nexport interface RepeatSourceDeclaration {\n pluginId: string\n /** The same id the plugin's editor source (`repeat-sources.ts`) uses. */\n id: string\n}\n\n/** The plugin declared to answer repeats, or `null` when none is. */\nexport function declaredRepeatSource(): RepeatSourceDeclaration | null {\n return PLUGIN_REPEAT_SOURCE_DECLARED\n}\n\ninterface RegisteredReader {\n pluginId: string\n reader: RepeatRowReader\n}\n\n/**\n * One table per process, on `globalThis` (AGL-3412): the app registers from\n * `instrumentation.ts`, which Next compiles apart from the routes that read,\n * and a module-scoped map would be filled in one copy and read empty in the\n * other — the exact failure this module exists to refuse.\n */\nconst READERS_KEY = Symbol.for('@aglyn/aglyn:repeat-row-readers')\n\nconst globalScope = globalThis as typeof globalThis & {\n [READERS_KEY]?: Map<string, RegisteredReader>\n}\n\nconst readers: Map<string, RegisteredReader> =\n globalScope[READERS_KEY] ?? (globalScope[READERS_KEY] = new Map())\n\n/**\n * Registers the reader for a source. Returns the unregister, which removes it\n * only while it is still the one registered.\n *\n * The owner is the plugin whose register fn is running, or the `pluginId`\n * passed for a boot declaration, where the loader's marker is not set. A\n * registration with neither is refused, and so is one from a plugin other\n * than the one the declaration names — two readers for one source would each\n * answer for the other's rows. The same plugin registering again replaces its\n * reader (a second surface, a repeated boot).\n */\nexport function registerRepeatRowReader(\n sourceId: string,\n reader: RepeatRowReader,\n options?: { pluginId?: string },\n): () => void {\n const id = sourceId.trim()\n const pluginId = (getRegisteringPluginId() ?? options?.pluginId ?? '').trim()\n if (!id) throw new Error('a repeat row reader needs a source id')\n if (!pluginId) {\n throw new Error(\n `repeat row reader \"${id}\" registered with no owner: pass { pluginId } ` +\n 'when registering outside a plugin register fn',\n )\n }\n const declared = declaredRepeatSource()\n if (declared?.id === id && declared.pluginId !== pluginId) {\n throw new Error(\n `repeat source \"${id}\" is declared by \"${declared.pluginId}\"; ` +\n `refused a reader from \"${pluginId}\"`,\n )\n }\n const held = readers.get(id)\n if (held && held.pluginId !== pluginId) {\n throw new Error(\n `repeat source \"${id}\" already has a reader from \"${held.pluginId}\"; ` +\n `refused \"${pluginId}\"`,\n )\n }\n const entry: RegisteredReader = { pluginId, reader }\n readers.set(id, entry)\n return () => {\n if (readers.get(id) === entry) readers.delete(id)\n }\n}\n\n/** The reader registered for a source, with its owner, or `null`. */\nexport function repeatRowReader(sourceId: string): RegisteredReader | null {\n return readers.get(sourceId) ?? null\n}\n\n/** Only for specs: forgets every registered reader. */\nexport function resetRepeatRowReadersForTests(): void {\n readers.clear()\n}\n\n/**\n * The declared source's reader was not registered, even after the app's\n * declarations step ran again. Thrown, never answered: see the module note.\n */\nexport class RepeatRowsUnavailableError extends Error {\n constructor(readonly source: RepeatSourceDeclaration) {\n super(\n `repeat source \"${source.id}\" is declared by \"${source.pluginId}\" but ` +\n 'no reader is registered in this process — its server declarations ' +\n 'did not run. Refusing to render repeats as if they had no rows.',\n )\n this.name = 'RepeatRowsUnavailableError'\n }\n}\n\n/**\n * The rows a composition's repeats render. See the module note for what each\n * of the three cases answers; with no keys it answers `{}` and asks nobody.\n */\nexport async function readRepeatRows(\n request: RepeatRowsRequest,\n): Promise<RepeatRowsAnswer> {\n const keys = [\n ...new Set(request.keys.map((key) => key.trim()).filter(Boolean)),\n ].sort()\n if (!keys.length) return {}\n const declared = declaredRepeatSource()\n if (!declared) return {}\n let registered = readers.get(declared.id)\n if (!registered) {\n try {\n await runPluginDeclarationsRepair()\n } catch (error) {\n console.error('[repeat-rows] the declarations repair failed', error)\n }\n registered = readers.get(declared.id)\n }\n if (!registered) throw new RepeatRowsUnavailableError(declared)\n return registered.reader({ hostId: request.hostId, keys })\n}\n"],"names":["globalScope","getRegisteringPluginId","PLUGIN_REPEAT_SOURCE_DECLARED","runPluginDeclarationsRepair","declaredRepeatSource","READERS_KEY","Symbol","for","globalThis","readers","Map","registerRepeatRowReader","sourceId","reader","options","id","trim","pluginId","Error","declared","held","get","entry","set","delete","repeatRowReader","resetRepeatRowReadersForTests","clear","RepeatRowsUnavailableError","source","name","readRepeatRows","request","keys","Set","map","key","filter","Boolean","sort","length","registered","error","console","hostId"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,OAyGCA;AAtGF,SAASC,sBAAsB,QAAQ,qCAAiC;AACxE,SAASC,6BAA6B,QAAQ,qCAAiC;AAC/E,SAASC,2BAA2B,QAAQ,kCAA8B;AA6E1E,mEAAmE,GACnE,OAAO,SAASC;IACd,OAAOF;AACT;AAOA;;;;;CAKC,GACD,MAAMG,cAAcC,OAAOC,GAAG,CAAC;AAE/B,MAAMP,cAAcQ;AAIpB,MAAMC,WACJT,2BAAAA,WAAW,CAACK,YAAY,YAAxBL,2BAA6BA,WAAW,CAACK,YAAY,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;AAEA;;;CAGC,GACD,OAAO,MAAMC,mCAAmCV;IAC9C,YAAY,AAASW,MAA+B,CAAE;QACpD,KAAK,CACH,CAAC,eAAe,EAAEA,OAAOd,EAAE,CAAC,kBAAkB,EAAEc,OAAOZ,QAAQ,CAAC,MAAM,CAAC,GACrE,uEACA,yEAJeY,SAAAA;QAMnB,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA;;;CAGC,GACD,OAAO,eAAeC,eACpBC,OAA0B;IAE1B,MAAMC,OAAO;WACR,IAAIC,IAAIF,QAAQC,IAAI,CAACE,GAAG,CAAC,CAACC,MAAQA,IAAIpB,IAAI,IAAIqB,MAAM,CAACC;KACzD,CAACC,IAAI;IACN,IAAI,CAACN,KAAKO,MAAM,EAAE,OAAO,CAAC;IAC1B,MAAMrB,WAAWf;IACjB,IAAI,CAACe,UAAU,OAAO,CAAC;IACvB,IAAIsB,aAAahC,QAAQY,GAAG,CAACF,SAASJ,EAAE;IACxC,IAAI,CAAC0B,YAAY;QACf,IAAI;YACF,MAAMtC;QACR,EAAE,OAAOuC,OAAO;YACdC,QAAQD,KAAK,CAAC,gDAAgDA;QAChE;QACAD,aAAahC,QAAQY,GAAG,CAACF,SAASJ,EAAE;IACtC;IACA,IAAI,CAAC0B,YAAY,MAAM,IAAIb,2BAA2BT;IACtD,OAAOsB,WAAW5B,MAAM,CAAC;QAAE+B,QAAQZ,QAAQY,MAAM;QAAEX;IAAK;AAC1D"}
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2026 Aglyn LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { type ContactLifecycleStage, type CrmActivityKind, type CrmTaskKind } from './crm-kinds';
|
|
18
|
-
import { type ClientInteractionStep, type InteractionCondition, type InteractionStepGuard, type InteractionTrigger, type SiteAlert, type SiteInteraction, type TriggerCombinator } from './site-interactions';
|
|
19
|
-
/**
|
|
20
|
-
* Actions builder (AGL-148): HubSpot-style event → action automation on
|
|
21
|
-
* top of the AGL-128 event triggers. An action listens for a host event
|
|
22
|
-
* (built-in or a custom name fired by another action), optionally filters
|
|
23
|
-
* on the payload, and runs an ordered step list. Pure types + validation
|
|
24
|
-
* here; the executor lives in the workflows plugin, where the I/O is.
|
|
25
|
-
*
|
|
26
|
-
* An action is a SITE INTERACTION (`site-interactions.ts`) with server steps
|
|
27
|
-
* added: its trigger, its conditions, its client steps and its storage are
|
|
28
|
-
* the platform's, and are re-exported here for the readers that take both
|
|
29
|
-
* from this module. What is declared below is the automation's own — the
|
|
30
|
-
* server steps, flows, recipes and webhooks.
|
|
31
|
-
*/
|
|
32
|
-
export * from './site-interactions';
|
|
33
|
-
/** The automation's names for the platform's interaction shapes. */
|
|
34
|
-
export type HostActionTriggerCondition = InteractionCondition;
|
|
35
|
-
export type HostActionTrigger = InteractionTrigger;
|
|
36
|
-
export type HostActionStepGuard = InteractionStepGuard;
|
|
37
|
-
/** Alert produced by a `siteAlert` step, surfaced to the emitting client. */
|
|
38
|
-
export type HostActionAlert = SiteAlert;
|
|
39
|
-
/**
|
|
40
|
-
* The scope key a resumed flow carries to say the wait ended on the CLOCK
|
|
41
|
-
* rather than on the event it was watching for.
|
|
42
|
-
*
|
|
43
|
-
* This is how a `waitForEvent` gets its timeout branch without a nested step
|
|
44
|
-
* list: the flow resumes either way, and the step after it carries a `when`
|
|
45
|
-
* naming this field. Underscored because it shares a namespace with the
|
|
46
|
-
* event payload's own fields, which are merchant-authored form field names.
|
|
47
|
-
*/
|
|
48
|
-
export declare const FLOW_TIMED_OUT_FIELD = "_waitTimedOut";
|
|
49
|
-
/** The steps an automation adds to the platform's client steps: the server's, run by the workflows plugin. */
|
|
50
|
-
type ServerActionStep = ({
|
|
51
|
-
type: 'runWorkflow';
|
|
52
|
-
workflowId?: string;
|
|
53
|
-
workflowName?: string;
|
|
54
|
-
} | {
|
|
55
|
-
type: 'customEvent';
|
|
56
|
-
eventName: string;
|
|
57
|
-
} | {
|
|
58
|
-
type: 'datasetAppend';
|
|
59
|
-
datasetId?: string;
|
|
60
|
-
datasetName?: string;
|
|
61
|
-
} | {
|
|
62
|
-
type: 'webhookPost';
|
|
63
|
-
webhookId?: string;
|
|
64
|
-
webhookName?: string;
|
|
65
|
-
} | {
|
|
66
|
-
type: 'sendEmail';
|
|
67
|
-
subject: string;
|
|
68
|
-
body: string;
|
|
69
|
-
toField?: string;
|
|
70
|
-
/**
|
|
71
|
-
* The stream this message belongs to, so a recipient who left it is not
|
|
72
|
-
* mailed. Absent on every step authored before topics reached the
|
|
73
|
-
* actions editor, which the executor resolves to the default topic.
|
|
74
|
-
*/
|
|
75
|
-
topicId?: string;
|
|
76
|
-
} | {
|
|
77
|
-
type: 'notifyAdmins';
|
|
78
|
-
title: string;
|
|
79
|
-
body?: string;
|
|
80
|
-
} | {
|
|
81
|
-
type: 'enrollList';
|
|
82
|
-
listId?: string;
|
|
83
|
-
listName?: string;
|
|
84
|
-
} | {
|
|
85
|
-
type: 'updateDataset';
|
|
86
|
-
datasetId?: string;
|
|
87
|
-
datasetName?: string;
|
|
88
|
-
} | {
|
|
89
|
-
type: 'assignCampaign';
|
|
90
|
-
campaignId?: string;
|
|
91
|
-
campaignName?: string;
|
|
92
|
-
} | {
|
|
93
|
-
type: 'wait';
|
|
94
|
-
/** Whole minutes to hold before the next step. */
|
|
95
|
-
delayMinutes: number;
|
|
96
|
-
} | {
|
|
97
|
-
type: 'waitForEvent';
|
|
98
|
-
/** The host or custom event that resumes this person's flow. */
|
|
99
|
-
eventName: string;
|
|
100
|
-
/**
|
|
101
|
-
* Whole minutes after which the flow continues anyway, with
|
|
102
|
-
* {@link FLOW_TIMED_OUT_FIELD} true in scope. There is always a
|
|
103
|
-
* deadline: a wait with no timeout is an enrollment that lives forever.
|
|
104
|
-
*/
|
|
105
|
-
timeoutMinutes: number;
|
|
106
|
-
}
|
|
107
|
-
/** Ends the enrollment here. Paired with a `when`, this is the exit branch. */
|
|
108
|
-
| {
|
|
109
|
-
type: 'exitFlow';
|
|
110
|
-
} | {
|
|
111
|
-
type: 'setContactStage';
|
|
112
|
-
lifecycleStage: ContactLifecycleStage;
|
|
113
|
-
} | {
|
|
114
|
-
type: 'addContactTag';
|
|
115
|
-
tag: string;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* The owner by uid when a member id was typed or a picker wrote the step,
|
|
119
|
-
* by email when an address was typed; the executor resolves either against
|
|
120
|
-
* the org's roster, and only the roster (AGL-2614).
|
|
121
|
-
* Or `roundRobin`, and the owner is the next member of the pool the CRM's
|
|
122
|
-
* settings keep (AGL-2618) — a step that names nobody and hands the
|
|
123
|
-
* choice to the rotation, so a stage change can spread its follow-ups
|
|
124
|
-
* across a team rather than pile them on one rep. The two are exclusive:
|
|
125
|
-
* a rotation step carries no member, and the validator refuses one that
|
|
126
|
-
* names both.
|
|
127
|
-
*/
|
|
128
|
-
| {
|
|
129
|
-
type: 'assignContactOwner';
|
|
130
|
-
ownerUid?: string;
|
|
131
|
-
ownerEmail?: string;
|
|
132
|
-
roundRobin?: boolean;
|
|
133
|
-
} | {
|
|
134
|
-
type: 'createCrmTask';
|
|
135
|
-
title: string;
|
|
136
|
-
kind: CrmTaskKind;
|
|
137
|
-
/** Days from the run to the due date; `0` is due today. */
|
|
138
|
-
dueInDays: number;
|
|
139
|
-
/**
|
|
140
|
-
* Who gets it — by uid or by an address, both resolved against the
|
|
141
|
-
* roster the way the owner step's are. Neither named, the task goes
|
|
142
|
-
* to the contact's owner, then to nobody.
|
|
143
|
-
*/
|
|
144
|
-
assigneeUid?: string;
|
|
145
|
-
assigneeEmail?: string;
|
|
146
|
-
} | {
|
|
147
|
-
type: 'logCrmActivity';
|
|
148
|
-
kind: CrmActivityKind;
|
|
149
|
-
body: string;
|
|
150
|
-
}) & {
|
|
151
|
-
/** See {@link InteractionStepGuard}. Absent means the step always runs. */
|
|
152
|
-
when?: InteractionStepGuard | null;
|
|
153
|
-
};
|
|
154
|
-
/** A step of an automation: one of the platform's client steps, or one of its server steps. */
|
|
155
|
-
export type HostActionStep = ClientInteractionStep | ServerActionStep;
|
|
156
|
-
/**
|
|
157
|
-
* The steps that suspend a run and continue it later, from a job beat.
|
|
158
|
-
*
|
|
159
|
-
* Named as a set rather than checked inline because three surfaces have to
|
|
160
|
-
* agree on it: the executor stops here and writes an enrollment, the client
|
|
161
|
-
* payload is truncated here, and the validator refuses a flow that waits
|
|
162
|
-
* without a person to wait for.
|
|
163
|
-
*/
|
|
164
|
-
export declare const FLOW_SUSPENDING_STEP_TYPES: ReadonlySet<HostActionStepType>;
|
|
165
|
-
export declare function isFlowSuspendingStep(step: HostActionStep): boolean;
|
|
166
|
-
/** Longest tag an automation may write — the console's own tag field cap. */
|
|
167
|
-
export declare const CONTACT_TAG_MAX_LENGTH = 60;
|
|
168
|
-
export declare const CRM_ACTION_RECIPE_IDS: readonly ["welcomeNewLead", "followUpWonDeal", "reengageStaleLead", "tagByForm"];
|
|
169
|
-
export type CrmActionRecipeId = (typeof CRM_ACTION_RECIPE_IDS)[number];
|
|
170
|
-
/** What a recipe is handed before it builds — today only the form `tagByForm` reads. */
|
|
171
|
-
export interface CrmActionRecipeInput {
|
|
172
|
-
form?: {
|
|
173
|
-
id: string;
|
|
174
|
-
name: string;
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
export interface CrmActionRecipe {
|
|
178
|
-
id: CrmActionRecipeId;
|
|
179
|
-
/** How the recipe reads in the menu; also the action's starting name. */
|
|
180
|
-
title: string;
|
|
181
|
-
/** One sentence under the title. */
|
|
182
|
-
description: string;
|
|
183
|
-
/**
|
|
184
|
-
* What must be picked before the recipe can be built. A recipe that needs
|
|
185
|
-
* nothing opens the editor at once; one that needs a form opens a picker
|
|
186
|
-
* first. Built WITHOUT its pick, such a recipe yields an action the
|
|
187
|
-
* validator refuses — a condition with no value — rather than one that
|
|
188
|
-
* saves and then silently matches nothing.
|
|
189
|
-
*/
|
|
190
|
-
needs?: 'form';
|
|
191
|
-
/**
|
|
192
|
-
* A fresh action each call, because the draft is edited in place. The
|
|
193
|
-
* action carries `recipe: id` — the provenance is the builder's to stamp,
|
|
194
|
-
* so a writer that saves what it was handed cannot forget it.
|
|
195
|
-
*/
|
|
196
|
-
build: (input?: CrmActionRecipeInput) => HostAction;
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* How long the stale-lead recipe holds before it decides a lead has gone
|
|
200
|
-
* quiet. A week: long enough that a rep who is working the lead has had a
|
|
201
|
-
* chance to move its stage, short enough that a lead nobody touched is
|
|
202
|
-
* still warm when the reminder lands.
|
|
203
|
-
*/
|
|
204
|
-
export declare const STALE_LEAD_WAIT_MINUTES: number;
|
|
205
|
-
/**
|
|
206
|
-
* The tag a form's captures get: the form's own name, cut to the tag cap.
|
|
207
|
-
* The name is what the person calls the form, so it is the tag they would
|
|
208
|
-
* have typed; the editor is open to change it before anything is saved.
|
|
209
|
-
*/
|
|
210
|
-
export declare function crmRecipeTagForForm(formName: string): string;
|
|
211
|
-
export declare const CRM_ACTION_RECIPES: readonly CrmActionRecipe[];
|
|
212
|
-
/** The recipe with this id, or null for a string that names none. */
|
|
213
|
-
export declare function crmActionRecipe(id: unknown): CrmActionRecipe | null;
|
|
214
|
-
/**
|
|
215
|
-
* The recipe a STORED action came from, read off its document (AGL-2639).
|
|
216
|
-
*
|
|
217
|
-
* Three answers, and the third is the one that matters. A known id: the
|
|
218
|
-
* action was installed from, or begun as, that recipe. `null`: the action
|
|
219
|
-
* was begun blank, or from a recipe this build no longer knows — the
|
|
220
|
-
* editor wrote the field and said "no recipe". `undefined`: the document
|
|
221
|
-
* carries no `recipe` field at all, which is every action saved before the
|
|
222
|
-
* stamp existed. Such an action may well have started from a recipe — the
|
|
223
|
-
* menu opened the editor prefilled long before anything recorded it — so a
|
|
224
|
-
* reader that needs to know whether a site has a recipe treats `undefined`
|
|
225
|
-
* as UNKNOWN, never as absent, and never writes a `null` over it.
|
|
226
|
-
*/
|
|
227
|
-
export declare function hostActionRecipeId(action: {
|
|
228
|
-
recipe?: unknown;
|
|
229
|
-
} | null | undefined): CrmActionRecipeId | null | undefined;
|
|
230
|
-
/**
|
|
231
|
-
* A HostAction as the document at `hosts/{hostId}/actions/{id}` holds it.
|
|
232
|
-
*
|
|
233
|
-
* Every optional trigger key is written OUT — a boolean cap as `false`, a
|
|
234
|
-
* cleared list as `null` — because the editor saves with a merge-set, and
|
|
235
|
-
* a merge keeps whatever key the payload omits: a frequency cap switched
|
|
236
|
-
* off, left out of the payload, would stay on. The legacy single
|
|
237
|
-
* `condition` is always nulled; `conditions` has been canonical since the
|
|
238
|
-
* list shape arrived and a document that carried both would have the
|
|
239
|
-
* reader pick. Everything else is the action, unchanged.
|
|
240
|
-
*
|
|
241
|
-
* `recipe` rides along only when the action SAYS something about it: an
|
|
242
|
-
* id or `null`. An action that carries no stamp (an older document, edited
|
|
243
|
-
* and saved again) keeps carrying none — see {@link hostActionRecipeId}
|
|
244
|
-
* for why an absent stamp must not become a `null` one.
|
|
245
|
-
*/
|
|
246
|
-
export interface HostActionDocument extends HostAction {
|
|
247
|
-
trigger: HostActionTrigger & {
|
|
248
|
-
oncePerVisitor: boolean;
|
|
249
|
-
oncePerSession: boolean;
|
|
250
|
-
cooldownMinutes: number | null;
|
|
251
|
-
everyTime: boolean;
|
|
252
|
-
condition: null;
|
|
253
|
-
conditions: HostActionTriggerCondition[] | null;
|
|
254
|
-
combinator: TriggerCombinator | null;
|
|
255
|
-
};
|
|
256
|
-
enabled: boolean;
|
|
257
|
-
}
|
|
258
|
-
export declare function hostActionDocument(action: HostAction): HostActionDocument;
|
|
259
|
-
/**
|
|
260
|
-
* The step list as the visitor's browser may see it.
|
|
261
|
-
*
|
|
262
|
-
* A client step AFTER a wait must never reach the page. The client engine
|
|
263
|
-
* runs its slice of the list immediately, so shipping the whole list would
|
|
264
|
-
* make "wait three days, then show the popup" show the popup at once — the
|
|
265
|
-
* delay would appear to work on the server, be ignored in the browser, and
|
|
266
|
-
* the two halves of one authored flow would disagree about when it happened.
|
|
267
|
-
*
|
|
268
|
-
* Truncating rather than filtering: everything past the first wait belongs to
|
|
269
|
-
* a run that has not happened yet, whichever side would have executed it.
|
|
270
|
-
*/
|
|
271
|
-
export declare function hostActionStepsForClient(steps: readonly HostActionStep[] | undefined | null): HostActionStep[];
|
|
272
|
-
export type HostActionStepType = HostActionStep['type'];
|
|
273
|
-
/**
|
|
274
|
-
* `hosts/{hostId}/actions/{id}` doc: a site interaction whose steps may be
|
|
275
|
-
* the automation's server steps as well as the platform's client steps.
|
|
276
|
-
*/
|
|
277
|
-
export interface HostAction extends SiteInteraction<HostActionStep> {
|
|
278
|
-
/**
|
|
279
|
-
* The recipe this action was installed from or begun as (AGL-2639), or
|
|
280
|
-
* `null` for one begun blank. Absent on a document from before the stamp
|
|
281
|
-
* existed — read it through {@link hostActionRecipeId}, which keeps the
|
|
282
|
-
* three cases apart.
|
|
283
|
-
*/
|
|
284
|
-
recipe?: CrmActionRecipeId | null;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* The shortest and longest a flow may wait.
|
|
288
|
-
*
|
|
289
|
-
* The floor is a minute because the resume beat runs on a minute, so anything
|
|
290
|
-
* under one is a delay the scheduler cannot honor and would only read as
|
|
291
|
-
* imprecision. The ceiling is ninety days: long enough for the win-back that
|
|
292
|
-
* is the longest sequence anybody writes, and short enough that an enrollment
|
|
293
|
-
* is not an unbounded lease on a document. A person waiting inside a flow is
|
|
294
|
-
* storage the merchant is not looking at, and a wait measured in years is
|
|
295
|
-
* indistinguishable from one nobody will ever collect.
|
|
296
|
-
*/
|
|
297
|
-
export declare const FLOW_WAIT_MIN_MINUTES = 1;
|
|
298
|
-
export declare const FLOW_WAIT_MAX_MINUTES: number;
|
|
299
|
-
export declare const HOST_ACTION_STEP_LABELS: Record<HostActionStepType, string>;
|
|
300
|
-
/** A whole number of minutes inside the wait band. */
|
|
301
|
-
export declare function isFlowWaitMinutes(value: unknown): boolean;
|
|
302
|
-
/** True for a custom (non-built-in) event name an action may fire. */
|
|
303
|
-
export declare function isCustomEventName(event: string): boolean;
|
|
304
|
-
/**
|
|
305
|
-
* Validates an action doc shape; returns a human-readable error or null.
|
|
306
|
-
* Server and console share this so bad steps never persist or run.
|
|
307
|
-
*/
|
|
308
|
-
export declare function validateHostAction(action: HostAction): string | null;
|
|
309
|
-
/** The most webhooks one site keeps; the site create route enforces it. */
|
|
310
|
-
export declare const WEBHOOK_MAX_PER_HOST = 5;
|