@aglyn/aglyn 1.0.0-beta.217 → 1.0.0-beta.219

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.
Files changed (348) hide show
  1. package/package.json +14 -14
  2. package/src/lib/app-utils/actions.d.ts +25 -374
  3. package/src/lib/app-utils/actions.js +101 -561
  4. package/src/lib/app-utils/actions.js.map +1 -1
  5. package/src/lib/app-utils/activity-presenter.d.ts +3 -3
  6. package/src/lib/app-utils/activity-presenter.js +36 -52
  7. package/src/lib/app-utils/activity-presenter.js.map +1 -1
  8. package/src/lib/app-utils/admin-audit-index.js +2 -2
  9. package/src/lib/app-utils/admin-audit-index.js.map +1 -1
  10. package/src/lib/app-utils/analytics-events.d.ts +11 -2
  11. package/src/lib/app-utils/analytics-events.js +11 -2
  12. package/src/lib/app-utils/analytics-events.js.map +1 -1
  13. package/src/lib/app-utils/analytics-provider.d.ts +182 -0
  14. package/src/lib/app-utils/analytics-provider.js +133 -0
  15. package/src/lib/app-utils/analytics-provider.js.map +1 -0
  16. package/src/lib/app-utils/api-plugins.d.ts +46 -0
  17. package/src/lib/app-utils/api-plugins.js +19 -0
  18. package/src/lib/app-utils/api-plugins.js.map +1 -1
  19. package/src/lib/app-utils/{marketplace-overrides.d.ts → artifact-overrides.d.ts} +9 -6
  20. package/src/lib/app-utils/{marketplace-overrides.js → artifact-overrides.js} +10 -7
  21. package/src/lib/app-utils/artifact-overrides.js.map +1 -0
  22. package/src/lib/app-utils/{marketplace-provenance.d.ts → artifact-provenance.d.ts} +12 -10
  23. package/src/lib/app-utils/{marketplace-provenance.js → artifact-provenance.js} +9 -7
  24. package/src/lib/app-utils/artifact-provenance.js.map +1 -0
  25. package/src/lib/app-utils/assist-credits.js +2 -1
  26. package/src/lib/app-utils/assist-credits.js.map +1 -1
  27. package/src/lib/app-utils/binding-token-catalog.d.ts +5 -13
  28. package/src/lib/app-utils/binding-token-catalog.js +17 -41
  29. package/src/lib/app-utils/binding-token-catalog.js.map +1 -1
  30. package/src/lib/app-utils/binding-tokens.js +1 -1
  31. package/src/lib/app-utils/binding-tokens.js.map +1 -1
  32. package/src/lib/app-utils/brand-support-line.d.ts +36 -0
  33. package/src/lib/app-utils/brand-support-line.js +38 -0
  34. package/src/lib/app-utils/brand-support-line.js.map +1 -0
  35. package/src/lib/app-utils/campaign-touch.d.ts +5 -5
  36. package/src/lib/app-utils/campaign-touch.js +8 -8
  37. package/src/lib/app-utils/campaign-touch.js.map +1 -1
  38. package/src/lib/app-utils/collection-entries.d.ts +2 -2
  39. package/src/lib/app-utils/collection-entries.js.map +1 -1
  40. package/src/lib/app-utils/consent-group-change.d.ts +4 -0
  41. package/src/lib/app-utils/consent-group-change.js.map +1 -1
  42. package/src/lib/app-utils/console-record-links.d.ts +10 -89
  43. package/src/lib/app-utils/console-record-links.js +3 -107
  44. package/src/lib/app-utils/console-record-links.js.map +1 -1
  45. package/src/lib/app-utils/console-routes.d.ts +16 -7
  46. package/src/lib/app-utils/console-routes.js +9 -3
  47. package/src/lib/app-utils/console-routes.js.map +1 -1
  48. package/src/lib/app-utils/contacts.d.ts +23 -1
  49. package/src/lib/app-utils/contacts.js +21 -5
  50. package/src/lib/app-utils/contacts.js.map +1 -1
  51. package/src/lib/app-utils/cross-pool-desync.d.ts +39 -0
  52. package/src/lib/app-utils/cross-pool-desync.js +47 -0
  53. package/src/lib/app-utils/cross-pool-desync.js.map +1 -0
  54. package/src/lib/app-utils/csv-upload.d.ts +29 -0
  55. package/src/lib/app-utils/csv-upload.js +29 -0
  56. package/src/lib/app-utils/csv-upload.js.map +1 -0
  57. package/src/lib/app-utils/dataset-models.d.ts +5 -5
  58. package/src/lib/app-utils/dataset-models.js +19 -2
  59. package/src/lib/app-utils/dataset-models.js.map +1 -1
  60. package/src/lib/app-utils/datasets.d.ts +65 -11
  61. package/src/lib/app-utils/datasets.js +74 -11
  62. package/src/lib/app-utils/datasets.js.map +1 -1
  63. package/src/lib/app-utils/docs-deflection.d.ts +6 -6
  64. package/src/lib/app-utils/docs-deflection.js.map +1 -1
  65. package/src/lib/app-utils/docs-help.generated.d.ts +12 -6
  66. package/src/lib/app-utils/docs-help.generated.js +21 -6
  67. package/src/lib/app-utils/docs-help.generated.js.map +1 -1
  68. package/src/lib/app-utils/docs-index.generated.d.ts +2 -2
  69. package/src/lib/app-utils/docs-index.generated.js +514 -318
  70. package/src/lib/app-utils/docs-index.generated.js.map +1 -1
  71. package/src/lib/app-utils/docs-retrieval.d.ts +3 -3
  72. package/src/lib/app-utils/docs-retrieval.js +14 -10
  73. package/src/lib/app-utils/docs-retrieval.js.map +1 -1
  74. package/src/lib/app-utils/duplicate-resource.d.ts +4 -1
  75. package/src/lib/app-utils/duplicate-resource.js +7 -4
  76. package/src/lib/app-utils/duplicate-resource.js.map +1 -1
  77. package/src/lib/app-utils/dynamic-list-rule.d.ts +1 -1
  78. package/src/lib/app-utils/dynamic-list-rule.js.map +1 -1
  79. package/src/lib/app-utils/element-ui.d.ts +1 -1
  80. package/src/lib/app-utils/element-ui.js +1 -1
  81. package/src/lib/app-utils/element-ui.js.map +1 -1
  82. package/src/lib/app-utils/email-starter-policy.js +3 -3
  83. package/src/lib/app-utils/email-starter-policy.js.map +1 -1
  84. package/src/lib/app-utils/entity-picker-context.d.ts +10 -5
  85. package/src/lib/app-utils/entity-picker-context.js.map +1 -1
  86. package/src/lib/app-utils/error-beacon.d.ts +75 -6
  87. package/src/lib/app-utils/error-beacon.js +160 -21
  88. package/src/lib/app-utils/error-beacon.js.map +1 -1
  89. package/src/lib/app-utils/expand-repeatables.d.ts +10 -10
  90. package/src/lib/app-utils/expand-repeatables.js +10 -10
  91. package/src/lib/app-utils/expand-repeatables.js.map +1 -1
  92. package/src/lib/app-utils/host-events.d.ts +82 -0
  93. package/src/lib/app-utils/host-events.js +62 -0
  94. package/src/lib/app-utils/host-events.js.map +1 -0
  95. package/src/lib/app-utils/lockdown.d.ts +33 -1
  96. package/src/lib/app-utils/lockdown.js +45 -4
  97. package/src/lib/app-utils/lockdown.js.map +1 -1
  98. package/src/lib/app-utils/margin-utilization.d.ts +4 -69
  99. package/src/lib/app-utils/margin-utilization.js +82 -69
  100. package/src/lib/app-utils/margin-utilization.js.map +1 -1
  101. package/src/lib/app-utils/node-definition-sanitizer.d.ts +16 -16
  102. package/src/lib/app-utils/node-definition-sanitizer.js +24 -20
  103. package/src/lib/app-utils/node-definition-sanitizer.js.map +1 -1
  104. package/src/lib/app-utils/node-interactions.d.ts +7 -7
  105. package/src/lib/app-utils/node-interactions.js.map +1 -1
  106. package/src/lib/app-utils/notifications.d.ts +78 -47
  107. package/src/lib/app-utils/notifications.js +63 -44
  108. package/src/lib/app-utils/notifications.js.map +1 -1
  109. package/src/lib/app-utils/payments-configured.d.ts +8 -21
  110. package/src/lib/app-utils/payments-configured.js +8 -23
  111. package/src/lib/app-utils/payments-configured.js.map +1 -1
  112. package/src/lib/app-utils/plan-entitlements.d.ts +43 -128
  113. package/src/lib/app-utils/plan-entitlements.js +145 -304
  114. package/src/lib/app-utils/plan-entitlements.js.map +1 -1
  115. package/src/lib/app-utils/platform-brand.d.ts +10 -0
  116. package/src/lib/app-utils/platform-brand.js +14 -3
  117. package/src/lib/app-utils/platform-brand.js.map +1 -1
  118. package/src/lib/app-utils/plugin-api-rate-limit.d.ts +7 -1
  119. package/src/lib/app-utils/plugin-api-rate-limit.js +11 -3
  120. package/src/lib/app-utils/plugin-api-rate-limit.js.map +1 -1
  121. package/src/lib/app-utils/plugin-bundle-checks.js +2 -2
  122. package/src/lib/app-utils/plugin-bundle-checks.js.map +1 -1
  123. package/src/lib/app-utils/plugin-host-events.generated.d.ts +12 -0
  124. package/src/lib/app-utils/plugin-host-events.generated.js +169 -0
  125. package/src/lib/app-utils/plugin-host-events.generated.js.map +1 -0
  126. package/src/lib/app-utils/plugin-release-flags.generated.d.ts +12 -0
  127. package/src/lib/app-utils/plugin-release-flags.generated.js +106 -0
  128. package/src/lib/app-utils/plugin-release-flags.generated.js.map +1 -0
  129. package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
  130. package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
  131. package/src/lib/app-utils/release-flags.d.ts +14 -5
  132. package/src/lib/app-utils/release-flags.js +21 -125
  133. package/src/lib/app-utils/release-flags.js.map +1 -1
  134. package/src/lib/app-utils/repeat-sources.d.ts +9 -0
  135. package/src/lib/app-utils/repeat-sources.js.map +1 -1
  136. package/src/lib/app-utils/retained-refusals.d.ts +73 -0
  137. package/src/lib/app-utils/retained-refusals.js +186 -0
  138. package/src/lib/app-utils/retained-refusals.js.map +1 -0
  139. package/src/lib/app-utils/scope-tokens.d.ts +27 -0
  140. package/src/lib/app-utils/scope-tokens.js +61 -0
  141. package/src/lib/app-utils/scope-tokens.js.map +1 -1
  142. package/src/lib/app-utils/screen-link-context.js +3 -3
  143. package/src/lib/app-utils/screen-link-context.js.map +1 -1
  144. package/src/lib/app-utils/screen-route.d.ts +15 -0
  145. package/src/lib/app-utils/screen-route.js +21 -1
  146. package/src/lib/app-utils/screen-route.js.map +1 -1
  147. package/src/lib/app-utils/seo-audit.d.ts +132 -0
  148. package/src/lib/app-utils/seo-audit.js +246 -0
  149. package/src/lib/app-utils/seo-audit.js.map +1 -0
  150. package/src/lib/app-utils/seo-keywords.d.ts +48 -0
  151. package/src/lib/app-utils/seo-keywords.js +60 -0
  152. package/src/lib/app-utils/seo-keywords.js.map +1 -0
  153. package/src/lib/app-utils/seo-page-facts.d.ts +66 -0
  154. package/src/lib/app-utils/seo-page-facts.js +155 -0
  155. package/src/lib/app-utils/seo-page-facts.js.map +1 -0
  156. package/src/lib/app-utils/seo-site-scan.d.ts +126 -0
  157. package/src/lib/app-utils/seo-site-scan.js +162 -0
  158. package/src/lib/app-utils/seo-site-scan.js.map +1 -0
  159. package/src/lib/app-utils/seo-title-variables.js +1 -1
  160. package/src/lib/app-utils/seo-title-variables.js.map +1 -1
  161. package/src/lib/app-utils/server.d.ts +6 -9
  162. package/src/lib/app-utils/server.js +17 -27
  163. package/src/lib/app-utils/server.js.map +1 -1
  164. package/src/lib/app-utils/site-interactions.d.ts +501 -0
  165. package/src/lib/app-utils/site-interactions.js +554 -0
  166. package/src/lib/app-utils/site-interactions.js.map +1 -0
  167. package/src/lib/app-utils/{marketplace-theme.d.ts → site-theme.d.ts} +13 -2
  168. package/src/lib/app-utils/{marketplace-theme.js → site-theme.js} +5 -2
  169. package/src/lib/app-utils/site-theme.js.map +1 -0
  170. package/src/lib/app-utils/sitemap.d.ts +4 -3
  171. package/src/lib/app-utils/sitemap.js +9 -7
  172. package/src/lib/app-utils/sitemap.js.map +1 -1
  173. package/src/lib/app-utils/stale-build-error.d.ts +51 -0
  174. package/src/lib/app-utils/stale-build-error.js +100 -1
  175. package/src/lib/app-utils/stale-build-error.js.map +1 -1
  176. package/src/lib/app-utils/starter-templates.d.ts +20 -0
  177. package/src/lib/app-utils/starter-templates.js +49 -0
  178. package/src/lib/app-utils/starter-templates.js.map +1 -1
  179. package/src/lib/app-utils/tax-jurisdiction-figures.d.ts +118 -0
  180. package/src/lib/app-utils/tax-jurisdiction-figures.js +123 -0
  181. package/src/lib/app-utils/tax-jurisdiction-figures.js.map +1 -0
  182. package/src/lib/app-utils/theme-library.d.ts +10 -3
  183. package/src/lib/app-utils/theme-library.js +13 -4
  184. package/src/lib/app-utils/theme-library.js.map +1 -1
  185. package/src/lib/app-utils/{campaign-attribution.d.ts → utm-attribution.d.ts} +11 -6
  186. package/src/lib/app-utils/{campaign-attribution.js → utm-attribution.js} +13 -8
  187. package/src/lib/app-utils/utm-attribution.js.map +1 -0
  188. package/src/lib/app-utils/{campaign-forwarding.d.ts → utm-forwarding.d.ts} +14 -14
  189. package/src/lib/app-utils/{campaign-forwarding.js → utm-forwarding.js} +26 -26
  190. package/src/lib/app-utils/utm-forwarding.js.map +1 -0
  191. package/src/lib/app-utils/video-object.js +6 -5
  192. package/src/lib/app-utils/video-object.js.map +1 -1
  193. package/src/lib/app-utils/visitor-consent.d.ts +41 -164
  194. package/src/lib/app-utils/visitor-consent.js +66 -277
  195. package/src/lib/app-utils/visitor-consent.js.map +1 -1
  196. package/src/lib/app-utils/web-vitals-rum.d.ts +7 -7
  197. package/src/lib/app-utils/web-vitals-rum.js +31 -63
  198. package/src/lib/app-utils/web-vitals-rum.js.map +1 -1
  199. package/src/lib/app-utils/where-used.d.ts +11 -6
  200. package/src/lib/app-utils/where-used.js +3 -8
  201. package/src/lib/app-utils/where-used.js.map +1 -1
  202. package/src/lib/canvas-manager/canvas-manager.js +3 -3
  203. package/src/lib/canvas-manager/canvas-manager.js.map +1 -1
  204. package/src/lib/foundation/definitions/components.types.d.ts +1 -1
  205. package/src/lib/foundation/definitions/components.types.js +1 -1
  206. package/src/lib/foundation/definitions/components.types.js.map +1 -1
  207. package/src/lib/foundation/definitions/org-billing.types.d.ts +18 -135
  208. package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
  209. package/src/lib/foundation/definitions/organization.types.d.ts +6 -3
  210. package/src/lib/foundation/definitions/organization.types.js.map +1 -1
  211. package/src/lib/foundation/definitions/platform.types.d.ts +27 -5
  212. package/src/lib/foundation/definitions/platform.types.js.map +1 -1
  213. package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +16 -0
  214. package/src/lib/foundation/definitions/write-deny-coverage.util.js +20 -0
  215. package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -1
  216. package/src/lib/foundation/index.d.ts +1 -1
  217. package/src/lib/foundation/index.js.map +1 -1
  218. package/src/lib/plugin-manager/besigner-documents.d.ts +96 -0
  219. package/src/lib/plugin-manager/besigner-documents.js +61 -0
  220. package/src/lib/plugin-manager/besigner-documents.js.map +1 -0
  221. package/src/lib/plugin-manager/computed-variables.d.ts +71 -0
  222. package/src/lib/plugin-manager/computed-variables.js +74 -0
  223. package/src/lib/plugin-manager/computed-variables.js.map +1 -0
  224. package/src/lib/plugin-manager/custom-fields.d.ts +29 -2
  225. package/src/lib/plugin-manager/custom-fields.js +47 -1
  226. package/src/lib/plugin-manager/custom-fields.js.map +1 -1
  227. package/src/lib/plugin-manager/feature-plugins.d.ts +292 -20
  228. package/src/lib/plugin-manager/feature-plugins.js +105 -17
  229. package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
  230. package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +123 -0
  231. package/src/lib/plugin-manager/first-party-plugins.generated.js +785 -14
  232. package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
  233. package/src/lib/plugin-manager/plugin-activity-actions.d.ts +12 -0
  234. package/src/lib/plugin-manager/plugin-activity-actions.js +25 -0
  235. package/src/lib/plugin-manager/plugin-activity-actions.js.map +1 -1
  236. package/src/lib/plugin-manager/plugin-contributions.d.ts +1 -1
  237. package/src/lib/plugin-manager/plugin-contributions.js.map +1 -1
  238. package/src/lib/plugin-manager/plugin-declarations-repair.d.ts +36 -0
  239. package/src/lib/plugin-manager/plugin-declarations-repair.js +64 -0
  240. package/src/lib/plugin-manager/plugin-declarations-repair.js.map +1 -0
  241. package/src/lib/plugin-manager/plugin-dependents.d.ts +101 -0
  242. package/src/lib/plugin-manager/plugin-dependents.js +75 -0
  243. package/src/lib/plugin-manager/plugin-dependents.js.map +1 -0
  244. package/src/lib/plugin-manager/plugin-distribution.d.ts +55 -0
  245. package/src/lib/plugin-manager/plugin-distribution.js +45 -0
  246. package/src/lib/plugin-manager/plugin-distribution.js.map +1 -0
  247. package/src/lib/plugin-manager/plugin-host-collections.d.ts +17 -0
  248. package/src/lib/plugin-manager/plugin-host-collections.js +6 -0
  249. package/src/lib/plugin-manager/plugin-host-collections.js.map +1 -1
  250. package/src/lib/plugin-manager/plugin-host-resources.d.ts +133 -0
  251. package/src/lib/plugin-manager/plugin-host-resources.js +52 -0
  252. package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -0
  253. package/src/lib/plugin-manager/plugin-org-erasure.d.ts +28 -2
  254. package/src/lib/plugin-manager/plugin-org-erasure.js +61 -2
  255. package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
  256. package/src/lib/plugin-manager/plugin-plan-entitlements.d.ts +123 -0
  257. package/src/lib/plugin-manager/plugin-plan-entitlements.js +101 -0
  258. package/src/lib/plugin-manager/plugin-plan-entitlements.js.map +1 -0
  259. package/src/lib/plugin-manager/plugin-record-index.d.ts +95 -0
  260. package/src/lib/plugin-manager/plugin-record-index.js +51 -0
  261. package/src/lib/plugin-manager/plugin-record-index.js.map +1 -0
  262. package/src/lib/plugin-manager/plugin-record-written.d.ts +58 -0
  263. package/src/lib/plugin-manager/plugin-record-written.js +42 -0
  264. package/src/lib/plugin-manager/plugin-record-written.js.map +1 -0
  265. package/src/lib/plugin-manager/plugin-revenue-sources.d.ts +213 -0
  266. package/src/lib/plugin-manager/plugin-revenue-sources.js +194 -0
  267. package/src/lib/plugin-manager/plugin-revenue-sources.js.map +1 -0
  268. package/src/lib/plugin-manager/plugin-site-bundle.d.ts +145 -0
  269. package/src/lib/plugin-manager/plugin-site-bundle.js +78 -0
  270. package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -0
  271. package/src/lib/plugin-manager/plugin-site-cache.d.ts +12 -0
  272. package/src/lib/plugin-manager/plugin-site-cache.js.map +1 -1
  273. package/src/lib/plugin-manager/plugin-site-export.d.ts +81 -0
  274. package/src/lib/plugin-manager/plugin-site-export.js +40 -0
  275. package/src/lib/plugin-manager/plugin-site-export.js.map +1 -0
  276. package/src/lib/plugin-manager/plugin-sitemap-sections.d.ts +88 -0
  277. package/src/lib/plugin-manager/plugin-sitemap-sections.js +29 -0
  278. package/src/lib/plugin-manager/plugin-sitemap-sections.js.map +1 -0
  279. package/src/lib/plugin-manager/plugin-tax-profile.d.ts +20 -4
  280. package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -1
  281. package/src/lib/plugin-manager/plugin-tax-return-sources.d.ts +255 -0
  282. package/src/lib/plugin-manager/plugin-tax-return-sources.js +191 -0
  283. package/src/lib/plugin-manager/plugin-tax-return-sources.js.map +1 -0
  284. package/src/lib/plugin-manager/plugin-template-sources.d.ts +75 -0
  285. package/src/lib/plugin-manager/plugin-template-sources.js +37 -0
  286. package/src/lib/plugin-manager/plugin-template-sources.js.map +1 -0
  287. package/src/lib/plugin-manager/plugin-usage-axes.d.ts +107 -0
  288. package/src/lib/plugin-manager/plugin-usage-axes.js +107 -0
  289. package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -0
  290. package/src/lib/plugin-manager/plugin-zones.d.ts +4 -5
  291. package/src/lib/plugin-manager/plugin-zones.js.map +1 -1
  292. package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
  293. package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
  294. package/src/lib/plugin-manager/record-captured-contact.d.ts +1 -14
  295. package/src/lib/plugin-manager/record-captured-contact.js +10 -32
  296. package/src/lib/plugin-manager/record-captured-contact.js.map +1 -1
  297. package/src/lib/plugin-manager/repeat-rows.d.ts +124 -0
  298. package/src/lib/plugin-manager/repeat-rows.js +108 -0
  299. package/src/lib/plugin-manager/repeat-rows.js.map +1 -0
  300. package/src/lib/plugin-manager/submission-record-target.d.ts +144 -0
  301. package/src/lib/plugin-manager/submission-record-target.js +125 -0
  302. package/src/lib/plugin-manager/submission-record-target.js.map +1 -0
  303. package/src/lib/plugin-manager/video-embed-provider.d.ts +108 -0
  304. package/src/lib/plugin-manager/video-embed-provider.js +165 -0
  305. package/src/lib/plugin-manager/video-embed-provider.js.map +1 -0
  306. package/src/lib/types/nodes.d.ts +2 -2
  307. package/src/lib/types/nodes.js.map +1 -1
  308. package/src/lib/app-utils/campaign-attribution.js.map +0 -1
  309. package/src/lib/app-utils/campaign-forwarding.js.map +0 -1
  310. package/src/lib/app-utils/contact-holder.d.ts +0 -68
  311. package/src/lib/app-utils/contact-holder.js +0 -129
  312. package/src/lib/app-utils/contact-holder.js.map +0 -1
  313. package/src/lib/app-utils/contact-merge.d.ts +0 -136
  314. package/src/lib/app-utils/contact-merge.js +0 -412
  315. package/src/lib/app-utils/contact-merge.js.map +0 -1
  316. package/src/lib/app-utils/crm-csv.d.ts +0 -239
  317. package/src/lib/app-utils/crm-csv.js +0 -467
  318. package/src/lib/app-utils/crm-csv.js.map +0 -1
  319. package/src/lib/app-utils/crm-digest.d.ts +0 -185
  320. package/src/lib/app-utils/crm-digest.js +0 -272
  321. package/src/lib/app-utils/crm-digest.js.map +0 -1
  322. package/src/lib/app-utils/form-dataset-binding.d.ts +0 -50
  323. package/src/lib/app-utils/form-dataset-binding.js +0 -74
  324. package/src/lib/app-utils/form-dataset-binding.js.map +0 -1
  325. package/src/lib/app-utils/list-import.d.ts +0 -158
  326. package/src/lib/app-utils/list-import.js +0 -332
  327. package/src/lib/app-utils/list-import.js.map +0 -1
  328. package/src/lib/app-utils/marketplace-listing-visibility.d.ts +0 -122
  329. package/src/lib/app-utils/marketplace-listing-visibility.js +0 -147
  330. package/src/lib/app-utils/marketplace-listing-visibility.js.map +0 -1
  331. package/src/lib/app-utils/marketplace-overrides.js.map +0 -1
  332. package/src/lib/app-utils/marketplace-provenance.js.map +0 -1
  333. package/src/lib/app-utils/marketplace-theme.js.map +0 -1
  334. package/src/lib/app-utils/marketplace-update-state.d.ts +0 -119
  335. package/src/lib/app-utils/marketplace-update-state.js +0 -132
  336. package/src/lib/app-utils/marketplace-update-state.js.map +0 -1
  337. package/src/lib/app-utils/publisher-agreement.d.ts +0 -289
  338. package/src/lib/app-utils/publisher-agreement.js +0 -321
  339. package/src/lib/app-utils/publisher-agreement.js.map +0 -1
  340. package/src/lib/app-utils/wistia-embed.d.ts +0 -104
  341. package/src/lib/app-utils/wistia-embed.js +0 -138
  342. package/src/lib/app-utils/wistia-embed.js.map +0 -1
  343. package/src/lib/app-utils/workflows.d.ts +0 -136
  344. package/src/lib/app-utils/workflows.js +0 -346
  345. package/src/lib/app-utils/workflows.js.map +0 -1
  346. package/src/lib/plugin-manager/commerce-zone-props.d.ts +0 -172
  347. package/src/lib/plugin-manager/commerce-zone-props.js +0 -31
  348. package/src/lib/plugin-manager/commerce-zone-props.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 { resolveAuthoredEventName, sanitizeEventParams } from "./analytics-events.js";
19
- import { sanitizeAuthorHtml } from "./author-html.js";
20
- import { CRM_TASK_MAX_DUE_DAYS, isContactLifecycleStage, isCrmActivityKind, isCrmTaskKind } from "./crm-kinds.js";
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 server-side where the I/O is (tenant utils).
28
- */ /**
29
- * Client-side site events (AGL-256) the tenant page runtime emits:
30
- * element interactions, scroll behavior, dwell time, and exit intent.
31
- * Trigger config (selector/threshold/path) rides the action's trigger.
32
- */ export const SITE_EVENT_TYPES = [
33
- 'scrollDepth',
34
- 'scrollToElement',
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
  *
@@ -450,107 +335,7 @@ export function hostActionDocument(action) {
450
335
  ...suspendAt < 0 ? list : list.slice(0, suspendAt)
451
336
  ];
452
337
  }
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
338
  /** 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
339
  /**
555
340
  * The shortest and longest a flow may wait.
556
341
  *
@@ -563,28 +348,6 @@ export const ACTION_MAX_STEPS = 10;
563
348
  * indistinguishable from one nobody will ever collect.
564
349
  */ export const FLOW_WAIT_MIN_MINUTES = 1;
565
350
  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
351
  export const HOST_ACTION_STEP_LABELS = {
589
352
  runWorkflow: 'Run a workflow',
590
353
  siteAlert: 'Show a site alert',
@@ -690,342 +453,119 @@ export const HOST_ACTION_STEP_LABELS = {
690
453
  * Validates an action doc shape; returns a human-readable error or null.
691
454
  * Server and console share this so bad steps never persist or run.
692
455
  */ export function validateHostAction(action) {
693
- var _ref, _action_steps;
694
- var _action_name, _action_trigger_event, _action_trigger, _action_trigger_selector, _action_trigger1, _action_trigger2, _action_trigger3, _action_trigger4;
456
+ var _action_name;
695
457
  if (!((_action_name = action.name) == null ? void 0 : _action_name.trim())) return 'Name the action';
696
458
  // A stamp is provenance, and provenance naming a recipe that does not
697
459
  // exist is a document nothing can read back; `null` and absent both pass.
698
460
  if (action.recipe != null && !crmActionRecipe(action.recipe)) {
699
461
  return 'Unknown recipe';
700
462
  }
701
- const event = (_ref = (_action_trigger = action.trigger) == null ? void 0 : (_action_trigger_event = _action_trigger.event) == null ? void 0 : _action_trigger_event.trim()) != null ? _ref : '';
702
- if (!event) return 'Pick a trigger event';
703
- if (!HOST_EVENT_TYPES.includes(event) && !isSiteEventType(event) && !isCustomEventName(event)) {
704
- return 'Custom event names are 2–40 letters, digits, dashes';
463
+ // The trigger, the step guards, the client steps and every declared step's
464
+ // pick are the platform's to check; the server steps are this module's.
465
+ return validateInteraction(action, {
466
+ validateStep: (step, label)=>serverStepProblem(step, label)
467
+ });
468
+ }
469
+ /**
470
+ * A server step's own complaint, or null. A `runWorkflow` step's pick is
471
+ * checked with every other declared step's (`interactionSteps` in
472
+ * `plugins.config.json`), by `validateInteraction`.
473
+ */ function serverStepProblem(step, label) {
474
+ var _step_datasetId, _step_datasetName, _step_webhookId, _step_webhookName, _step_title, _step_listId, _step_listName, _step_datasetId1, _step_datasetName1, _step_campaignId, _step_campaignName;
475
+ if (step.type === 'wait' && !isFlowWaitMinutes(step.delayMinutes)) {
476
+ return `${label}: wait between ${FLOW_WAIT_MIN_MINUTES} minute and ${FLOW_WAIT_MAX_MINUTES} minutes`;
477
+ }
478
+ if (step.type === 'waitForEvent') {
479
+ var _ref;
480
+ var _step_eventName;
481
+ const waited = (_ref = (_step_eventName = step.eventName) == null ? void 0 : _step_eventName.trim()) != null ? _ref : '';
482
+ if (!waited || !HOST_EVENT_TYPES.includes(waited) && !isCustomEventName(waited)) {
483
+ return `${label}: pick the event to wait for`;
484
+ }
485
+ if (!isFlowWaitMinutes(step.timeoutMinutes)) {
486
+ return `${label}: give up after ${FLOW_WAIT_MIN_MINUTES}–${FLOW_WAIT_MAX_MINUTES} minutes`;
487
+ }
705
488
  }
706
- // Site-event trigger config (AGL-256; hover events AGL-562).
707
- if (ELEMENT_SCOPED_SITE_EVENTS.includes(event) && !((_action_trigger1 = action.trigger) == null ? void 0 : (_action_trigger_selector = _action_trigger1.selector) == null ? void 0 : _action_trigger_selector.trim())) {
708
- return 'This trigger needs a CSS selector';
489
+ if (step.type === 'customEvent') {
490
+ var _ref1;
491
+ var _step_eventName1;
492
+ if (!isCustomEventName((_ref1 = (_step_eventName1 = step.eventName) == null ? void 0 : _step_eventName1.trim()) != null ? _ref1 : '')) {
493
+ return `${label}: custom event names are 2–40 letters, digits, dashes`;
494
+ }
709
495
  }
710
- if ([
711
- 'scrollDepth',
712
- 'timeOnPage'
713
- ].includes(event) && !(Number((_action_trigger2 = action.trigger) == null ? void 0 : _action_trigger2.threshold) > 0)) {
714
- return event === 'scrollDepth' ? 'Set the scroll percentage (1–100)' : 'Set the seconds on page';
496
+ if (step.type === 'datasetAppend' && !((_step_datasetId = step.datasetId) == null ? void 0 : _step_datasetId.trim()) && !((_step_datasetName = step.datasetName) == null ? void 0 : _step_datasetName.trim())) {
497
+ return `${label}: pick a dataset`;
715
498
  }
716
- // Frequency caps (AGL-274).
717
- if (((_action_trigger3 = action.trigger) == null ? void 0 : _action_trigger3.cooldownMinutes) != null && !(Number(action.trigger.cooldownMinutes) >= 1)) {
718
- return 'Cooldown must be at least 1 minute';
499
+ if (step.type === 'webhookPost' && !((_step_webhookId = step.webhookId) == null ? void 0 : _step_webhookId.trim()) && !((_step_webhookName = step.webhookName) == null ? void 0 : _step_webhookName.trim())) {
500
+ return `${label}: pick a webhook`;
719
501
  }
720
- // Structured payload conditions (AGL-557; chained AGL-565).
721
- const combinator = (_action_trigger4 = action.trigger) == null ? void 0 : _action_trigger4.combinator;
722
- if (combinator != null && !TRIGGER_COMBINATORS.includes(combinator)) {
723
- return 'Combine conditions with AND or OR';
502
+ if (step.type === 'sendEmail') {
503
+ var _step_subject, _step_body;
504
+ if (!((_step_subject = step.subject) == null ? void 0 : _step_subject.trim())) return `${label}: enter the subject`;
505
+ if (!((_step_body = step.body) == null ? void 0 : _step_body.trim())) return `${label}: enter the email body`;
724
506
  }
725
- const conditions = normalizeTriggerConditions(action.trigger);
726
- if (conditions.length > ACTION_MAX_CONDITIONS) {
727
- return `Conditions are capped at ${ACTION_MAX_CONDITIONS}`;
507
+ if (step.type === 'notifyAdmins' && !((_step_title = step.title) == null ? void 0 : _step_title.trim())) {
508
+ return `${label}: enter the notification title`;
728
509
  }
729
- for (const [index, condition] of conditions.entries()){
730
- var _condition_field, _condition_value;
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
- }
510
+ if (step.type === 'enrollList' && !((_step_listId = step.listId) == null ? void 0 : _step_listId.trim()) && !((_step_listName = step.listName) == null ? void 0 : _step_listName.trim())) {
511
+ return `${label}: pick a list`;
743
512
  }
744
- const steps = (_action_steps = action.steps) != null ? _action_steps : [];
745
- if (!steps.length) return 'Add at least one step';
746
- if (steps.length > ACTION_MAX_STEPS) {
747
- return `Actions are capped at ${ACTION_MAX_STEPS} steps`;
513
+ if (step.type === 'updateDataset' && !((_step_datasetId1 = step.datasetId) == null ? void 0 : _step_datasetId1.trim()) && !((_step_datasetName1 = step.datasetName) == null ? void 0 : _step_datasetName1.trim())) {
514
+ return `${label}: pick a dataset`;
748
515
  }
749
- for (const [index, step] of steps.entries()){
750
- var _ref1;
751
- var _step_when, _step_when1, _step_workflowId, _step_workflowName, _step_message, _step_datasetId, _step_datasetName, _step_webhookId, _step_webhookName, _step_selector, _step_selector1, _step_code, _step_url, _step_title, _step_overlayId, _step_overlayName, _step_listId, _step_listName, _step_datasetId1, _step_datasetName1, _step_campaignId, _step_campaignName;
752
- const label = `Step ${index + 1}`;
753
- // A step's own guard, checked with the same messages the trigger's
754
- // clauses get — one condition editor, one set of complaints about it.
755
- const guardClauses = ((_ref1 = (_step_when = step.when) == null ? void 0 : _step_when.conditions) != null ? _ref1 : []).filter(Boolean);
756
- if (guardClauses.length > ACTION_MAX_CONDITIONS) {
757
- return `${label}: conditions are capped at ${ACTION_MAX_CONDITIONS}`;
758
- }
759
- if (((_step_when1 = step.when) == null ? void 0 : _step_when1.combinator) != null && !TRIGGER_COMBINATORS.includes(step.when.combinator)) {
760
- return `${label}: combine conditions with AND or OR`;
761
- }
762
- for (const clause of guardClauses){
763
- var _clause_field, _clause_value;
764
- if (!TRIGGER_CONDITION_OPS.includes(clause.op)) {
765
- return `${label}: pick a condition operator`;
766
- }
767
- if (!((_clause_field = clause.field) == null ? void 0 : _clause_field.trim())) {
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`;
516
+ if (step.type === 'assignCampaign' && !((_step_campaignId = step.campaignId) == null ? void 0 : _step_campaignId.trim()) && !((_step_campaignName = step.campaignName) == null ? void 0 : _step_campaignName.trim())) {
517
+ return `${label}: pick a campaign`;
518
+ }
519
+ // CRM steps (AGL-2605). A stage or a kind outside its vocabulary is
520
+ // refused here rather than stored: the executor treats the value as
521
+ // trusted and would write it into a facet every stage report counts.
522
+ if (step.type === 'setContactStage' && !isContactLifecycleStage(step.lifecycleStage)) {
523
+ return `${label}: pick a lifecycle stage`;
524
+ }
525
+ if (step.type === 'addContactTag') {
526
+ var _ref2;
527
+ var _step_tag;
528
+ const tag = (_ref2 = (_step_tag = step.tag) == null ? void 0 : _step_tag.trim()) != null ? _ref2 : '';
529
+ if (!tag) return `${label}: enter the tag`;
530
+ if (tag.length > CONTACT_TAG_MAX_LENGTH) {
531
+ return `${label}: tags are at most ${CONTACT_TAG_MAX_LENGTH} characters`;
947
532
  }
948
- if (step.type === 'addContactTag') {
949
- var _ref5;
950
- var _step_tag;
951
- const tag = (_ref5 = (_step_tag = step.tag) == null ? void 0 : _step_tag.trim()) != null ? _ref5 : '';
952
- if (!tag) return `${label}: enter the tag`;
953
- if (tag.length > CONTACT_TAG_MAX_LENGTH) {
954
- return `${label}: tags are at most ${CONTACT_TAG_MAX_LENGTH} characters`;
955
- }
533
+ }
534
+ if (step.type === 'assignContactOwner') {
535
+ var _step_ownerUid, _step_ownerEmail, _step_ownerUid1, _step_ownerEmail1;
536
+ const named = Boolean(((_step_ownerUid = step.ownerUid) == null ? void 0 : _step_ownerUid.trim()) || ((_step_ownerEmail = step.ownerEmail) == null ? void 0 : _step_ownerEmail.trim()));
537
+ if (step.roundRobin === true && named) {
538
+ return `${label}: pick round robin or a member, not both`;
956
539
  }
957
- if (step.type === 'assignContactOwner') {
958
- var _step_ownerUid, _step_ownerEmail, _step_ownerUid1, _step_ownerEmail1;
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
- }
540
+ 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('@'))) {
541
+ return `${label}: enter the owner’s email address`;
966
542
  }
967
- if (step.type === 'createCrmTask') {
968
- var _ref6;
969
- var _step_title1, _step_assigneeEmail;
970
- if (!((_step_title1 = step.title) == null ? void 0 : _step_title1.trim())) return `${label}: give the task a title`;
971
- if (!isCrmTaskKind(step.kind)) return `${label}: pick the kind of task`;
972
- if (!Number.isInteger(step.dueInDays) || step.dueInDays < 0 || step.dueInDays > CRM_TASK_MAX_DUE_DAYS) {
973
- return `${label}: due in 0–${CRM_TASK_MAX_DUE_DAYS} days`;
974
- }
975
- // Optional — but an address that is not one would resolve to nobody at
976
- // run time, and the task would land unassigned with no word why.
977
- const assigneeEmail = (_ref6 = (_step_assigneeEmail = step.assigneeEmail) == null ? void 0 : _step_assigneeEmail.trim()) != null ? _ref6 : '';
978
- if (assigneeEmail && !assigneeEmail.includes('@')) {
979
- return `${label}: enter the assignee’s email address`;
980
- }
543
+ }
544
+ if (step.type === 'createCrmTask') {
545
+ var _ref3;
546
+ var _step_title1, _step_assigneeEmail;
547
+ if (!((_step_title1 = step.title) == null ? void 0 : _step_title1.trim())) return `${label}: give the task a title`;
548
+ if (!isCrmTaskKind(step.kind)) return `${label}: pick the kind of task`;
549
+ if (!Number.isInteger(step.dueInDays) || step.dueInDays < 0 || step.dueInDays > CRM_TASK_MAX_DUE_DAYS) {
550
+ return `${label}: due in 0–${CRM_TASK_MAX_DUE_DAYS} days`;
551
+ }
552
+ // Optional — but an address that is not one would resolve to nobody at
553
+ // run time, and the task would land unassigned with no word why.
554
+ const assigneeEmail = (_ref3 = (_step_assigneeEmail = step.assigneeEmail) == null ? void 0 : _step_assigneeEmail.trim()) != null ? _ref3 : '';
555
+ if (assigneeEmail && !assigneeEmail.includes('@')) {
556
+ return `${label}: enter the assignee’s email address`;
981
557
  }
982
- if (step.type === 'logCrmActivity') {
983
- var _step_body1;
984
- if (!isCrmActivityKind(step.kind)) {
985
- return `${label}: pick the kind of activity`;
986
- }
987
- if (!((_step_body1 = step.body) == null ? void 0 : _step_body1.trim())) return `${label}: write what happened`;
558
+ }
559
+ if (step.type === 'logCrmActivity') {
560
+ var _step_body1;
561
+ if (!isCrmActivityKind(step.kind)) {
562
+ return `${label}: pick the kind of activity`;
988
563
  }
564
+ if (!((_step_body1 = step.body) == null ? void 0 : _step_body1.trim())) return `${label}: write what happened`;
989
565
  }
990
566
  return null;
991
567
  }
992
568
  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
569
  /** 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;
1030
570
 
1031
571
  //# sourceMappingURL=actions.js.map