@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
@@ -1,136 +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 HostFunction } from './functions';
18
- import type { HostVariable } from './variables';
19
- /**
20
- * Workflows (Workflow Builder, AGL-101): named pipelines of host-function
21
- * calls. Each step evaluates its argument expressions over host variables
22
- * and previous step results, runs the function through the safe evaluator,
23
- * and stores the result under its name for later steps. Pure and bounded —
24
- * no I/O, no loops. Site-event triggers arrive in v2.
25
- */
26
- /**
27
- * Host events a workflow can trigger on (AGL-128). The tenant emits these
28
- * server-side: form submit API, analytics collector, membership APIs.
29
- *
30
- * SERVER DOORS ONLY. An event exists because a request handler that already
31
- * performed the write called `emitHostEvent` beside it; nothing watches the
32
- * database. So a contact created by a console user's client-direct Firestore
33
- * write fires nothing, and a CRM event (AGL-2605) is only as complete as the
34
- * set of server paths that emit it — the capture doors for `contactCreated`,
35
- * the `crm/contact-stage` route for `contactStageChanged`.
36
- */
37
- export declare const HOST_EVENT_TYPES: readonly ["formSubmission", "pageView", "memberSignUp", "memberSignIn", "memberSignOut", "lead", "booking", "taskCompleted", "contactCreated", "contactStageChanged", "dealStageChanged", "dealWon", "dealLost"];
38
- export type HostEventType = (typeof HOST_EVENT_TYPES)[number];
39
- /**
40
- * How a built-in event reads in a trigger picker and a run history row.
41
- *
42
- * `Partial`, deliberately. The event list grows a line at a time from
43
- * several hands, and an exhaustive record would make every addition a
44
- * compile error until its label landed in the same change — which is the
45
- * right pressure on a stage picker and the wrong one here, where two
46
- * branches adding events beside each other must merge cleanly. An unlabeled
47
- * event falls back to its identifier through {@link hostEventLabel}, which
48
- * is what every picker rendered for every event until AGL-2605.
49
- */
50
- export declare const HOST_EVENT_LABELS: Partial<Record<HostEventType, string>>;
51
- /**
52
- * `formSubmission` → `Form submitted`; a custom event keeps its own name,
53
- * because the author chose it and it is already the word they think in.
54
- */
55
- export declare function hostEventLabel(event: string | undefined | null): string;
56
- /**
57
- * The payload keys each built-in event puts in scope, for the filter
58
- * expression and the step conditions — the thing an author has to know to
59
- * write `lifecycleStage == "customer"` and had nowhere to read.
60
- *
61
- * Documented from the emitters, not from a schema, because the payload is
62
- * whatever the emitting door passed: `formSubmission` carries every
63
- * submitted field under its own name on top of the two fixed keys, which
64
- * no fixed list can enumerate. `Partial` for the same reason as the labels.
65
- */
66
- export declare const HOST_EVENT_PAYLOAD_KEYS: Partial<Record<HostEventType, readonly string[]>>;
67
- /**
68
- * One sentence naming what a trigger's filter and conditions can read, or
69
- * `null` for an event whose payload is not documented — a custom event, or
70
- * a built-in one nobody has written down yet.
71
- */
72
- export declare function hostEventPayloadHint(event: string | undefined | null): string | null;
73
- export interface HostWorkflowTrigger {
74
- event: HostEventType;
75
- /**
76
- * Optional expression over the event payload (plus variables); the
77
- * workflow only runs when it evaluates truthy (e.g. `path == "/pricing"`).
78
- */
79
- filter?: string;
80
- }
81
- export interface HostWorkflowStep {
82
- /**
83
- * Host function to run — by doc id (AGL-261), rename-safe. Steps saved
84
- * before AGL-261 carry only `functionName`; executors resolve id first.
85
- */
86
- functionId?: string;
87
- /** Legacy name reference, kept as the display hint; `functionId` wins. */
88
- functionName: string;
89
- /**
90
- * One expression per function parameter, evaluated over variables and
91
- * previous step results (e.g. `price * qty`, `step1 + 10`).
92
- */
93
- args: string[];
94
- /** Scope name the step's result binds to; defaults to `step<N>`. */
95
- resultName?: string;
96
- }
97
- /** `hosts/{hostId}/workflows/{id}` doc. */
98
- export interface HostWorkflow {
99
- name: string;
100
- steps: HostWorkflowStep[];
101
- /** Scope name whose final value the workflow returns. */
102
- returnValue?: string;
103
- /** Event trigger (AGL-128); absent means manual/embedded use only. */
104
- trigger?: HostWorkflowTrigger | null;
105
- }
106
- export declare const WORKFLOW_MAX_STEPS = 25;
107
- /** Max nesting across workflow→function→workflow cross-calls (AGL-129). */
108
- export declare const CROSS_MAX_DEPTH = 3;
109
- export type WorkflowRunResult = {
110
- ok: true;
111
- value: number | string | boolean;
112
- results: Record<string, number | string | boolean>;
113
- } | {
114
- ok: false;
115
- error: string;
116
- step?: number;
117
- };
118
- export interface WorkflowRunContext {
119
- /** All host workflows by name, enabling function→workflow calls. */
120
- workflows?: Record<string, HostWorkflow>;
121
- /** Cross-call nesting depth; internal — callers omit it. */
122
- depth?: number;
123
- }
124
- export declare function runWorkflow(workflow: HostWorkflow, functions: Record<string, HostFunction>, variables?: Record<string, HostVariable>,
125
- /**
126
- * Extra scope entries seeded ahead of the steps — event payloads (path,
127
- * formName, field values) land here (AGL-128). Wins over variables.
128
- */
129
- extraScope?: Record<string, number | string | boolean>, context?: WorkflowRunContext): WorkflowRunResult;
130
- /**
131
- * Computed variables (AGL-129): a variable with `workflowName` takes the
132
- * named workflow's result as its value at compose time; failures keep the
133
- * stored fallback value. Each computed variable evaluates once, bounded
134
- * by the shared depth guard.
135
- */
136
- export declare function resolveComputedVariables(variables: Record<string, HostVariable>, functions: Record<string, HostFunction>, workflows: Record<string, HostWorkflow>): Record<string, HostVariable>;
@@ -1,346 +0,0 @@
1
- import { _ as _extends } from "@swc/helpers/_/_extends";
2
- /**
3
- * @license
4
- * Copyright 2026 Aglyn LLC
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */ import { evaluateExpression, evaluateHostFunction } from "./functions.js";
18
- /**
19
- * Workflows (Workflow Builder, AGL-101): named pipelines of host-function
20
- * calls. Each step evaluates its argument expressions over host variables
21
- * and previous step results, runs the function through the safe evaluator,
22
- * and stores the result under its name for later steps. Pure and bounded —
23
- * no I/O, no loops. Site-event triggers arrive in v2.
24
- */ /**
25
- * Host events a workflow can trigger on (AGL-128). The tenant emits these
26
- * server-side: form submit API, analytics collector, membership APIs.
27
- *
28
- * SERVER DOORS ONLY. An event exists because a request handler that already
29
- * performed the write called `emitHostEvent` beside it; nothing watches the
30
- * database. So a contact created by a console user's client-direct Firestore
31
- * write fires nothing, and a CRM event (AGL-2605) is only as complete as the
32
- * set of server paths that emit it — the capture doors for `contactCreated`,
33
- * the `crm/contact-stage` route for `contactStageChanged`.
34
- */ export const HOST_EVENT_TYPES = [
35
- 'formSubmission',
36
- 'pageView',
37
- 'memberSignUp',
38
- 'memberSignIn',
39
- 'memberSignOut',
40
- 'lead',
41
- 'booking',
42
- // A CRM task was marked done (AGL-2599). Emitted by the console's
43
- // `crm/task-complete` route rather than by a Firestore trigger, so the
44
- // payload names who completed it and what it hung off.
45
- 'taskCompleted',
46
- 'contactCreated',
47
- 'contactStageChanged',
48
- 'dealStageChanged',
49
- 'dealWon',
50
- 'dealLost'
51
- ];
52
- /**
53
- * How a built-in event reads in a trigger picker and a run history row.
54
- *
55
- * `Partial`, deliberately. The event list grows a line at a time from
56
- * several hands, and an exhaustive record would make every addition a
57
- * compile error until its label landed in the same change — which is the
58
- * right pressure on a stage picker and the wrong one here, where two
59
- * branches adding events beside each other must merge cleanly. An unlabeled
60
- * event falls back to its identifier through {@link hostEventLabel}, which
61
- * is what every picker rendered for every event until AGL-2605.
62
- */ export const HOST_EVENT_LABELS = {
63
- formSubmission: 'Form submitted',
64
- pageView: 'Page viewed',
65
- memberSignUp: 'Member signed up',
66
- memberSignIn: 'Member signed in',
67
- memberSignOut: 'Member signed out',
68
- lead: 'New lead',
69
- booking: 'New booking',
70
- contactCreated: 'Contact created',
71
- contactStageChanged: 'Contact changed stage',
72
- taskCompleted: 'CRM task completed',
73
- dealStageChanged: 'Deal moved',
74
- dealWon: 'Deal won',
75
- dealLost: 'Deal lost'
76
- };
77
- /**
78
- * `formSubmission` → `Form submitted`; a custom event keeps its own name,
79
- * because the author chose it and it is already the word they think in.
80
- */ export function hostEventLabel(event) {
81
- var _HOST_EVENT_LABELS_key;
82
- const key = String(event != null ? event : '').trim();
83
- if (!key) return 'Event';
84
- return (_HOST_EVENT_LABELS_key = HOST_EVENT_LABELS[key]) != null ? _HOST_EVENT_LABELS_key : key;
85
- }
86
- /**
87
- * The payload keys each built-in event puts in scope, for the filter
88
- * expression and the step conditions — the thing an author has to know to
89
- * write `lifecycleStage == "customer"` and had nowhere to read.
90
- *
91
- * Documented from the emitters, not from a schema, because the payload is
92
- * whatever the emitting door passed: `formSubmission` carries every
93
- * submitted field under its own name on top of the two fixed keys, which
94
- * no fixed list can enumerate. `Partial` for the same reason as the labels.
95
- */ export const HOST_EVENT_PAYLOAD_KEYS = {
96
- formSubmission: [
97
- 'formName',
98
- 'path',
99
- 'and every submitted field by name'
100
- ],
101
- pageView: [
102
- 'path'
103
- ],
104
- memberSignUp: [
105
- 'email'
106
- ],
107
- memberSignIn: [
108
- 'email'
109
- ],
110
- lead: [
111
- 'email',
112
- 'source',
113
- 'leadId'
114
- ],
115
- booking: [
116
- 'serviceName',
117
- 'email',
118
- 'startsAtMs'
119
- ],
120
- contactCreated: [
121
- 'contactId',
122
- 'email',
123
- 'name',
124
- 'source',
125
- 'hostId',
126
- 'lifecycleStage',
127
- 'campaignIds',
128
- // Present only when the capture came through a form (AGL-2626), so
129
- // `formId` equals a form's id is the condition that picks that
130
- // form's people out of every other door's.
131
- 'formId'
132
- ],
133
- contactStageChanged: [
134
- 'contactId',
135
- 'email',
136
- 'lifecycleStage',
137
- 'previousStage'
138
- ],
139
- taskCompleted: [
140
- 'taskId',
141
- 'title',
142
- 'kind',
143
- 'priority',
144
- 'dueAtMs',
145
- 'completedAtMs',
146
- 'completedByUid',
147
- 'assigneeUid',
148
- 'createdByUid',
149
- 'contactId',
150
- 'companyId',
151
- 'dealId',
152
- 'taskHostId'
153
- ],
154
- dealStageChanged: [
155
- 'dealId',
156
- 'title',
157
- 'amountCents',
158
- 'currency',
159
- 'stageId',
160
- 'previousStageId',
161
- 'ownerUid',
162
- 'contactId',
163
- 'companyId'
164
- ],
165
- dealWon: [
166
- 'dealId',
167
- 'title',
168
- 'amountCents',
169
- 'currency',
170
- 'stageId',
171
- 'previousStageId',
172
- 'ownerUid',
173
- 'contactId',
174
- 'companyId'
175
- ],
176
- dealLost: [
177
- 'dealId',
178
- 'title',
179
- 'amountCents',
180
- 'currency',
181
- 'stageId',
182
- 'previousStageId',
183
- 'ownerUid',
184
- 'contactId',
185
- 'companyId',
186
- 'lostReason'
187
- ]
188
- };
189
- /**
190
- * One sentence naming what a trigger's filter and conditions can read, or
191
- * `null` for an event whose payload is not documented — a custom event, or
192
- * a built-in one nobody has written down yet.
193
- */ export function hostEventPayloadHint(event) {
194
- const keys = HOST_EVENT_PAYLOAD_KEYS[String(event != null ? event : '')];
195
- if (!(keys == null ? void 0 : keys.length)) return null;
196
- return `In scope: ${keys.join(', ')}.`;
197
- }
198
- export const WORKFLOW_MAX_STEPS = 25;
199
- /** Max nesting across workflow→function→workflow cross-calls (AGL-129). */ export const CROSS_MAX_DEPTH = 3;
200
- /** Variable values as a typed expression scope (mirrors resolveBindings). */ function variableScope(variables) {
201
- const scope = {};
202
- for (const [key, variable] of Object.entries(variables)){
203
- var _variable_value, _variable_value1;
204
- const value = variable.type === 'number' ? Number((_variable_value = variable.value) != null ? _variable_value : 0) : variable.type === 'boolean' ? variable.value === 'true' : (_variable_value1 = variable.value) != null ? _variable_value1 : '';
205
- scope[key] = value;
206
- // Under its NAME as well (AGL-3202). Callers key this map by name, by
207
- // id, or by both; an expression only ever says the name, so a map keyed
208
- // by id alone used to give it nothing to find.
209
- if (variable.name && !Object.prototype.hasOwnProperty.call(scope, variable.name)) {
210
- scope[variable.name] = value;
211
- }
212
- }
213
- return scope;
214
- }
215
- export function runWorkflow(workflow, functions, variables = {}, /**
216
- * Extra scope entries seeded ahead of the steps — event payloads (path,
217
- * formName, field values) land here (AGL-128). Wins over variables.
218
- */ extraScope = {}, context = {}) {
219
- var _workflow_steps, _context_depth, _Object_values_at;
220
- var _workflow_returnValue;
221
- const steps = (_workflow_steps = workflow.steps) != null ? _workflow_steps : [];
222
- if (steps.length > WORKFLOW_MAX_STEPS) {
223
- return {
224
- ok: false,
225
- error: `Workflows are capped at ${WORKFLOW_MAX_STEPS} steps`
226
- };
227
- }
228
- const depth = (_context_depth = context.depth) != null ? _context_depth : 0;
229
- if (depth > CROSS_MAX_DEPTH) {
230
- return {
231
- ok: false,
232
- error: 'Workflow nesting is too deep'
233
- };
234
- }
235
- // Function steps may call other workflows (AGL-129); every hop shares
236
- // this depth guard so mutual recursion terminates.
237
- const invokeWorkflow = (name, callScope)=>{
238
- var _context_workflows;
239
- const nested = (_context_workflows = context.workflows) == null ? void 0 : _context_workflows[name == null ? void 0 : name.trim()];
240
- if (!nested) throw new Error(`Unknown workflow "${name}"`);
241
- const run = runWorkflow(nested, functions, variables, callScope, _extends({}, context, {
242
- depth: depth + 1
243
- }));
244
- if (run.ok === false) throw new Error(run.error);
245
- return run.value;
246
- };
247
- // The site's variables, apart from the step results layered over them:
248
- // they are what a function may read by name (AGL-3202), wherever it runs.
249
- const siteVariables = variableScope(variables);
250
- const scope = _extends({}, siteVariables, extraScope);
251
- const results = {};
252
- for (const [index, step] of steps.entries()){
253
- var _functions_, _ref, _ref1;
254
- var _step_functionId, _step_functionName, _step_resultName;
255
- // Id-first resolution (AGL-261): maps are double-keyed by id and name.
256
- const definition = (_functions_ = functions[(_ref = (_step_functionId = step.functionId) == null ? void 0 : _step_functionId.trim()) != null ? _ref : '']) != null ? _functions_ : functions[(_ref1 = (_step_functionName = step.functionName) == null ? void 0 : _step_functionName.trim()) != null ? _ref1 : ''];
257
- if (!definition) {
258
- return {
259
- ok: false,
260
- error: `Unknown function "${step.functionName || step.functionId}"`,
261
- step: index + 1
262
- };
263
- }
264
- const args = {};
265
- try {
266
- var _definition_parameters;
267
- (_definition_parameters = definition.parameters) == null ? void 0 : _definition_parameters.forEach((parameter, parameterIndex)=>{
268
- var _step_args;
269
- const expression = (_step_args = step.args) == null ? void 0 : _step_args[parameterIndex];
270
- if (expression != null && String(expression).trim() !== '') {
271
- args[parameter.name] = evaluateExpression(String(expression), scope);
272
- }
273
- });
274
- } catch (error) {
275
- return {
276
- ok: false,
277
- error: `Step ${index + 1}: ${error.message}`,
278
- step: index + 1
279
- };
280
- }
281
- const run = evaluateHostFunction(definition, args, _extends({}, context.workflows ? {
282
- invokeWorkflow
283
- } : {}, {
284
- // A function that prices from `extra_site_price` on a page must not
285
- // fail with "Unknown name" the day a workflow calls it.
286
- globals: siteVariables
287
- }));
288
- // `=== false` (not `!run.ok`): the union fails to narrow under the
289
- // stricter lib build tsconfig otherwise (same quirk as publish.ts).
290
- if (run.ok === false) {
291
- return {
292
- ok: false,
293
- error: `Step ${index + 1} (${definition.name}): ${run.error}`,
294
- step: index + 1
295
- };
296
- }
297
- const resultName = ((_step_resultName = step.resultName) == null ? void 0 : _step_resultName.trim()) || `step${index + 1}`;
298
- scope[resultName] = run.value;
299
- results[resultName] = run.value;
300
- }
301
- const returnName = (_workflow_returnValue = workflow.returnValue) == null ? void 0 : _workflow_returnValue.trim();
302
- const value = returnName && returnName in scope ? scope[returnName] : (_Object_values_at = Object.values(results).at(-1)) != null ? _Object_values_at : '';
303
- return {
304
- ok: true,
305
- value,
306
- results
307
- };
308
- }
309
- /**
310
- * Computed variables (AGL-129): a variable with `workflowName` takes the
311
- * named workflow's result as its value at compose time; failures keep the
312
- * stored fallback value. Each computed variable evaluates once, bounded
313
- * by the shared depth guard.
314
- */ export function resolveComputedVariables(variables, functions, workflows) {
315
- const resolved = {};
316
- // Lookup maps are double-keyed by id and name (AGL-185), so the same doc
317
- // can appear under two keys — evaluate each workflow once per doc.
318
- const memo = new Map();
319
- for (const [name, variable] of Object.entries(variables)){
320
- var _ref, _ref1;
321
- var _variable_workflowId_trim, _variable_workflowId, _variable_workflowName;
322
- const workflowId = (_ref = (_variable_workflowId = variable.workflowId) == null ? void 0 : (_variable_workflowId_trim = _variable_workflowId.trim) == null ? void 0 : _variable_workflowId_trim.call(_variable_workflowId)) != null ? _ref : '';
323
- const workflowName = (_variable_workflowName = variable.workflowName) == null ? void 0 : _variable_workflowName.trim();
324
- const workflow = (_ref1 = workflowId ? workflows[workflowId] : undefined) != null ? _ref1 : workflowName ? workflows[workflowName] : undefined;
325
- if (!workflow) {
326
- resolved[name] = variable;
327
- continue;
328
- }
329
- const cached = memo.get(variable);
330
- if (cached) {
331
- resolved[name] = cached;
332
- continue;
333
- }
334
- const run = runWorkflow(workflow, functions, variables, {}, {
335
- workflows
336
- });
337
- const next = run.ok === false ? variable : _extends({}, variable, {
338
- value: String(run.value)
339
- });
340
- memo.set(variable, next);
341
- resolved[name] = next;
342
- }
343
- return resolved;
344
- }
345
-
346
- //# sourceMappingURL=workflows.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/workflows.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 {\n evaluateExpression,\n evaluateHostFunction,\n type HostFunction,\n} from './functions'\nimport type { HostVariable } from './variables'\n\n/**\n * Workflows (Workflow Builder, AGL-101): named pipelines of host-function\n * calls. Each step evaluates its argument expressions over host variables\n * and previous step results, runs the function through the safe evaluator,\n * and stores the result under its name for later steps. Pure and bounded —\n * no I/O, no loops. Site-event triggers arrive in v2.\n */\n\n/**\n * Host events a workflow can trigger on (AGL-128). The tenant emits these\n * server-side: form submit API, analytics collector, membership APIs.\n *\n * SERVER DOORS ONLY. An event exists because a request handler that already\n * performed the write called `emitHostEvent` beside it; nothing watches the\n * database. So a contact created by a console user's client-direct Firestore\n * write fires nothing, and a CRM event (AGL-2605) is only as complete as the\n * set of server paths that emit it — the capture doors for `contactCreated`,\n * the `crm/contact-stage` route for `contactStageChanged`.\n */\nexport const HOST_EVENT_TYPES = [\n 'formSubmission',\n 'pageView',\n 'memberSignUp',\n 'memberSignIn',\n 'memberSignOut',\n 'lead',\n 'booking',\n // A CRM task was marked done (AGL-2599). Emitted by the console's\n // `crm/task-complete` route rather than by a Firestore trigger, so the\n // payload names who completed it and what it hung off.\n 'taskCompleted',\n 'contactCreated',\n 'contactStageChanged',\n 'dealStageChanged',\n 'dealWon',\n 'dealLost',\n] as const\n\nexport type HostEventType = (typeof HOST_EVENT_TYPES)[number]\n\n/**\n * How a built-in event reads in a trigger picker and a run history row.\n *\n * `Partial`, deliberately. The event list grows a line at a time from\n * several hands, and an exhaustive record would make every addition a\n * compile error until its label landed in the same change — which is the\n * right pressure on a stage picker and the wrong one here, where two\n * branches adding events beside each other must merge cleanly. An unlabeled\n * event falls back to its identifier through {@link hostEventLabel}, which\n * is what every picker rendered for every event until AGL-2605.\n */\nexport const HOST_EVENT_LABELS: Partial<Record<HostEventType, string>> = {\n formSubmission: 'Form submitted',\n pageView: 'Page viewed',\n memberSignUp: 'Member signed up',\n memberSignIn: 'Member signed in',\n memberSignOut: 'Member signed out',\n lead: 'New lead',\n booking: 'New booking',\n contactCreated: 'Contact created',\n contactStageChanged: 'Contact changed stage',\n taskCompleted: 'CRM task completed',\n dealStageChanged: 'Deal moved',\n dealWon: 'Deal won',\n dealLost: 'Deal lost',\n}\n\n/**\n * `formSubmission` → `Form submitted`; a custom event keeps its own name,\n * because the author chose it and it is already the word they think in.\n */\nexport function hostEventLabel(event: string | undefined | null): string {\n const key = String(event ?? '').trim()\n if (!key) return 'Event'\n return HOST_EVENT_LABELS[key as HostEventType] ?? key\n}\n\n/**\n * The payload keys each built-in event puts in scope, for the filter\n * expression and the step conditions — the thing an author has to know to\n * write `lifecycleStage == \"customer\"` and had nowhere to read.\n *\n * Documented from the emitters, not from a schema, because the payload is\n * whatever the emitting door passed: `formSubmission` carries every\n * submitted field under its own name on top of the two fixed keys, which\n * no fixed list can enumerate. `Partial` for the same reason as the labels.\n */\nexport const HOST_EVENT_PAYLOAD_KEYS: Partial<\n Record<HostEventType, readonly string[]>\n> = {\n formSubmission: ['formName', 'path', 'and every submitted field by name'],\n pageView: ['path'],\n memberSignUp: ['email'],\n memberSignIn: ['email'],\n lead: ['email', 'source', 'leadId'],\n booking: ['serviceName', 'email', 'startsAtMs'],\n contactCreated: [\n 'contactId',\n 'email',\n 'name',\n 'source',\n 'hostId',\n 'lifecycleStage',\n 'campaignIds',\n // Present only when the capture came through a form (AGL-2626), so\n // `formId` equals a form's id is the condition that picks that\n // form's people out of every other door's.\n 'formId',\n ],\n contactStageChanged: ['contactId', 'email', 'lifecycleStage', 'previousStage'],\n taskCompleted: [\n 'taskId',\n 'title',\n 'kind',\n 'priority',\n 'dueAtMs',\n 'completedAtMs',\n 'completedByUid',\n 'assigneeUid',\n 'createdByUid',\n 'contactId',\n 'companyId',\n 'dealId',\n 'taskHostId',\n ],\n dealStageChanged: [\n 'dealId',\n 'title',\n 'amountCents',\n 'currency',\n 'stageId',\n 'previousStageId',\n 'ownerUid',\n 'contactId',\n 'companyId',\n ],\n dealWon: [\n 'dealId',\n 'title',\n 'amountCents',\n 'currency',\n 'stageId',\n 'previousStageId',\n 'ownerUid',\n 'contactId',\n 'companyId',\n ],\n dealLost: [\n 'dealId',\n 'title',\n 'amountCents',\n 'currency',\n 'stageId',\n 'previousStageId',\n 'ownerUid',\n 'contactId',\n 'companyId',\n 'lostReason',\n ],\n}\n\n/**\n * One sentence naming what a trigger's filter and conditions can read, or\n * `null` for an event whose payload is not documented — a custom event, or\n * a built-in one nobody has written down yet.\n */\nexport function hostEventPayloadHint(\n event: string | undefined | null,\n): string | null {\n const keys = HOST_EVENT_PAYLOAD_KEYS[String(event ?? '') as HostEventType]\n if (!keys?.length) return null\n return `In scope: ${keys.join(', ')}.`\n}\n\nexport interface HostWorkflowTrigger {\n event: HostEventType\n /**\n * Optional expression over the event payload (plus variables); the\n * workflow only runs when it evaluates truthy (e.g. `path == \"/pricing\"`).\n */\n filter?: string\n}\n\nexport interface HostWorkflowStep {\n /**\n * Host function to run — by doc id (AGL-261), rename-safe. Steps saved\n * before AGL-261 carry only `functionName`; executors resolve id first.\n */\n functionId?: string\n /** Legacy name reference, kept as the display hint; `functionId` wins. */\n functionName: string\n /**\n * One expression per function parameter, evaluated over variables and\n * previous step results (e.g. `price * qty`, `step1 + 10`).\n */\n args: string[]\n /** Scope name the step's result binds to; defaults to `step<N>`. */\n resultName?: string\n}\n\n/** `hosts/{hostId}/workflows/{id}` doc. */\nexport interface HostWorkflow {\n name: string\n steps: HostWorkflowStep[]\n /** Scope name whose final value the workflow returns. */\n returnValue?: string\n /** Event trigger (AGL-128); absent means manual/embedded use only. */\n trigger?: HostWorkflowTrigger | null\n}\n\nexport const WORKFLOW_MAX_STEPS = 25\n/** Max nesting across workflow→function→workflow cross-calls (AGL-129). */\nexport const CROSS_MAX_DEPTH = 3\n\nexport type WorkflowRunResult =\n | {\n ok: true\n value: number | string | boolean\n results: Record<string, number | string | boolean>\n }\n | { ok: false; error: string; step?: number }\n\n/** Variable values as a typed expression scope (mirrors resolveBindings). */\nfunction variableScope(\n variables: Record<string, HostVariable>,\n): Record<string, number | string | boolean> {\n const scope: Record<string, number | string | boolean> = {}\n for (const [key, variable] of Object.entries(variables)) {\n const value =\n variable.type === 'number'\n ? Number(variable.value ?? 0)\n : variable.type === 'boolean'\n ? variable.value === 'true'\n : (variable.value ?? '')\n scope[key] = value\n // Under its NAME as well (AGL-3202). Callers key this map by name, by\n // id, or by both; an expression only ever says the name, so a map keyed\n // by id alone used to give it nothing to find.\n if (\n variable.name &&\n !Object.prototype.hasOwnProperty.call(scope, variable.name)\n ) {\n scope[variable.name] = value\n }\n }\n return scope\n}\n\nexport interface WorkflowRunContext {\n /** All host workflows by name, enabling function→workflow calls. */\n workflows?: Record<string, HostWorkflow>\n /** Cross-call nesting depth; internal — callers omit it. */\n depth?: number\n}\n\nexport function runWorkflow(\n workflow: HostWorkflow,\n functions: Record<string, HostFunction>,\n variables: Record<string, HostVariable> = {},\n /**\n * Extra scope entries seeded ahead of the steps — event payloads (path,\n * formName, field values) land here (AGL-128). Wins over variables.\n */\n extraScope: Record<string, number | string | boolean> = {},\n context: WorkflowRunContext = {},\n): WorkflowRunResult {\n const steps = workflow.steps ?? []\n if (steps.length > WORKFLOW_MAX_STEPS) {\n return { ok: false, error: `Workflows are capped at ${WORKFLOW_MAX_STEPS} steps` }\n }\n const depth = context.depth ?? 0\n if (depth > CROSS_MAX_DEPTH) {\n return { ok: false, error: 'Workflow nesting is too deep' }\n }\n // Function steps may call other workflows (AGL-129); every hop shares\n // this depth guard so mutual recursion terminates.\n const invokeWorkflow = (\n name: string,\n callScope: Record<string, number | string | boolean>,\n ): number | string | boolean => {\n const nested = context.workflows?.[name?.trim()]\n if (!nested) throw new Error(`Unknown workflow \"${name}\"`)\n const run = runWorkflow(nested, functions, variables, callScope, {\n ...context,\n depth: depth + 1,\n })\n if (run.ok === false) throw new Error(run.error)\n return run.value\n }\n // The site's variables, apart from the step results layered over them:\n // they are what a function may read by name (AGL-3202), wherever it runs.\n const siteVariables = variableScope(variables)\n const scope = { ...siteVariables, ...extraScope }\n const results: Record<string, number | string | boolean> = {}\n\n for (const [index, step] of steps.entries()) {\n // Id-first resolution (AGL-261): maps are double-keyed by id and name.\n const definition =\n functions[step.functionId?.trim() ?? ''] ??\n functions[step.functionName?.trim() ?? '']\n if (!definition) {\n return {\n ok: false,\n error: `Unknown function \"${step.functionName || step.functionId}\"`,\n step: index + 1,\n }\n }\n const args: Record<string, unknown> = {}\n try {\n definition.parameters?.forEach((parameter, parameterIndex) => {\n const expression = step.args?.[parameterIndex]\n if (expression != null && String(expression).trim() !== '') {\n args[parameter.name] = evaluateExpression(String(expression), scope)\n }\n })\n } catch (error) {\n return {\n ok: false,\n error: `Step ${index + 1}: ${(error as Error).message}`,\n step: index + 1,\n }\n }\n const run = evaluateHostFunction(definition, args, {\n ...(context.workflows ? { invokeWorkflow } : {}),\n // A function that prices from `extra_site_price` on a page must not\n // fail with \"Unknown name\" the day a workflow calls it.\n globals: siteVariables,\n })\n // `=== false` (not `!run.ok`): the union fails to narrow under the\n // stricter lib build tsconfig otherwise (same quirk as publish.ts).\n if (run.ok === false) {\n return {\n ok: false,\n error: `Step ${index + 1} (${definition.name}): ${run.error}`,\n step: index + 1,\n }\n }\n const resultName = step.resultName?.trim() || `step${index + 1}`\n scope[resultName] = run.value\n results[resultName] = run.value\n }\n\n const returnName = workflow.returnValue?.trim()\n const value =\n returnName && returnName in scope\n ? scope[returnName]\n : (Object.values(results).at(-1) ?? '')\n return { ok: true, value, results }\n}\n\n/**\n * Computed variables (AGL-129): a variable with `workflowName` takes the\n * named workflow's result as its value at compose time; failures keep the\n * stored fallback value. Each computed variable evaluates once, bounded\n * by the shared depth guard.\n */\nexport function resolveComputedVariables(\n variables: Record<string, HostVariable>,\n functions: Record<string, HostFunction>,\n workflows: Record<string, HostWorkflow>,\n): Record<string, HostVariable> {\n const resolved: Record<string, HostVariable> = {}\n // Lookup maps are double-keyed by id and name (AGL-185), so the same doc\n // can appear under two keys — evaluate each workflow once per doc.\n const memo = new Map<HostVariable, HostVariable>()\n for (const [name, variable] of Object.entries(variables)) {\n const workflowId = (variable as any).workflowId?.trim?.() ?? ''\n const workflowName = variable.workflowName?.trim()\n const workflow =\n (workflowId ? workflows[workflowId] : undefined) ??\n (workflowName ? workflows[workflowName] : undefined)\n if (!workflow) {\n resolved[name] = variable\n continue\n }\n const cached = memo.get(variable)\n if (cached) {\n resolved[name] = cached\n continue\n }\n const run = runWorkflow(workflow, functions, variables, {}, { workflows })\n const next =\n run.ok === false\n ? variable\n : { ...variable, value: String(run.value) }\n memo.set(variable, next)\n resolved[name] = next\n }\n return resolved\n}\n"],"names":["evaluateExpression","evaluateHostFunction","HOST_EVENT_TYPES","HOST_EVENT_LABELS","formSubmission","pageView","memberSignUp","memberSignIn","memberSignOut","lead","booking","contactCreated","contactStageChanged","taskCompleted","dealStageChanged","dealWon","dealLost","hostEventLabel","event","key","String","trim","HOST_EVENT_PAYLOAD_KEYS","hostEventPayloadHint","keys","length","join","WORKFLOW_MAX_STEPS","CROSS_MAX_DEPTH","variableScope","variables","scope","variable","Object","entries","value","type","Number","name","prototype","hasOwnProperty","call","runWorkflow","workflow","functions","extraScope","context","steps","ok","error","depth","invokeWorkflow","callScope","nested","workflows","Error","run","siteVariables","results","index","step","definition","functionId","functionName","args","parameters","forEach","parameter","parameterIndex","expression","message","globals","resultName","returnName","returnValue","values","at","resolveComputedVariables","resolved","memo","Map","workflowId","workflowName","undefined","cached","get","next","set"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,kBAAkB,EAClBC,oBAAoB,QAEf,iBAAa;AAGpB;;;;;;CAMC,GAED;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,mBAAmB;IAC9B;IACA;IACA;IACA;IACA;IACA;IACA;IACA,kEAAkE;IAClE,uEAAuE;IACvE,uDAAuD;IACvD;IACA;IACA;IACA;IACA;IACA;CACD,CAAS;AAIV;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,oBAA4D;IACvEC,gBAAgB;IAChBC,UAAU;IACVC,cAAc;IACdC,cAAc;IACdC,eAAe;IACfC,MAAM;IACNC,SAAS;IACTC,gBAAgB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