@aglyn/aglyn 1.0.0-beta.220 → 1.0.0-beta.222

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/package.json +15 -11
  2. package/src/lib/app-utils/agent-openapi.js +1 -1
  3. package/src/lib/app-utils/agent-openapi.js.map +1 -1
  4. package/src/lib/app-utils/analytics-events.d.ts +3 -2
  5. package/src/lib/app-utils/analytics-events.js +3 -2
  6. package/src/lib/app-utils/analytics-events.js.map +1 -1
  7. package/src/lib/app-utils/api-plugins.d.ts +30 -0
  8. package/src/lib/app-utils/api-plugins.js +24 -1
  9. package/src/lib/app-utils/api-plugins.js.map +1 -1
  10. package/src/lib/app-utils/author-html.d.ts +1 -1
  11. package/src/lib/app-utils/author-html.js.map +1 -1
  12. package/src/lib/app-utils/bandwidth-cap.d.ts +12 -1
  13. package/src/lib/app-utils/bandwidth-cap.js +17 -1
  14. package/src/lib/app-utils/bandwidth-cap.js.map +1 -1
  15. package/src/lib/app-utils/compose-reusable-components.d.ts +19 -0
  16. package/src/lib/app-utils/compose-reusable-components.js +116 -26
  17. package/src/lib/app-utils/compose-reusable-components.js.map +1 -1
  18. package/src/lib/app-utils/console-routes.d.ts +4 -0
  19. package/src/lib/app-utils/console-routes.js +3 -0
  20. package/src/lib/app-utils/console-routes.js.map +1 -1
  21. package/src/lib/app-utils/contacts.d.ts +71 -0
  22. package/src/lib/app-utils/contacts.js +55 -0
  23. package/src/lib/app-utils/contacts.js.map +1 -1
  24. package/src/lib/app-utils/contexts.d.ts +1 -0
  25. package/src/lib/app-utils/contexts.js +1 -0
  26. package/src/lib/app-utils/contexts.js.map +1 -1
  27. package/src/lib/app-utils/crm-email-templates.js +21 -4
  28. package/src/lib/app-utils/crm-email-templates.js.map +1 -1
  29. package/src/lib/app-utils/crm-kinds.d.ts +2 -0
  30. package/src/lib/app-utils/crm-kinds.js +1 -0
  31. package/src/lib/app-utils/crm-kinds.js.map +1 -1
  32. package/src/lib/app-utils/crm.d.ts +1199 -67
  33. package/src/lib/app-utils/crm.js +1951 -310
  34. package/src/lib/app-utils/crm.js.map +1 -1
  35. package/src/lib/app-utils/csv-import.d.ts +10 -38
  36. package/src/lib/app-utils/csv-import.js +17 -42
  37. package/src/lib/app-utils/csv-import.js.map +1 -1
  38. package/src/lib/app-utils/csv.d.ts +32 -11
  39. package/src/lib/app-utils/csv.js +43 -5
  40. package/src/lib/app-utils/csv.js.map +1 -1
  41. package/src/lib/app-utils/default-site.d.ts +116 -0
  42. package/src/lib/app-utils/default-site.js +1024 -0
  43. package/src/lib/app-utils/default-site.js.map +1 -0
  44. package/src/lib/app-utils/docs-help.generated.d.ts +23 -23
  45. package/src/lib/app-utils/docs-help.generated.js +47 -10
  46. package/src/lib/app-utils/docs-help.generated.js.map +1 -1
  47. package/src/lib/app-utils/docs-index.generated.js +746 -151
  48. package/src/lib/app-utils/docs-index.generated.js.map +1 -1
  49. package/src/lib/app-utils/draft-placeholders.d.ts +76 -0
  50. package/src/lib/app-utils/draft-placeholders.js +115 -0
  51. package/src/lib/app-utils/draft-placeholders.js.map +1 -0
  52. package/src/lib/app-utils/entity-picker-context.d.ts +19 -15
  53. package/src/lib/app-utils/entity-picker-context.js +4 -4
  54. package/src/lib/app-utils/entity-picker-context.js.map +1 -1
  55. package/src/lib/app-utils/expand-repeatables.d.ts +66 -10
  56. package/src/lib/app-utils/expand-repeatables.js +88 -14
  57. package/src/lib/app-utils/expand-repeatables.js.map +1 -1
  58. package/src/lib/app-utils/forms.d.ts +33 -22
  59. package/src/lib/app-utils/forms.js +47 -28
  60. package/src/lib/app-utils/forms.js.map +1 -1
  61. package/src/lib/app-utils/full-use-cost.d.ts +277 -0
  62. package/src/lib/app-utils/full-use-cost.js +421 -0
  63. package/src/lib/app-utils/full-use-cost.js.map +1 -0
  64. package/src/lib/app-utils/health-report.js +33 -0
  65. package/src/lib/app-utils/health-report.js.map +1 -1
  66. package/src/lib/app-utils/leaving-notice.d.ts +96 -0
  67. package/src/lib/app-utils/leaving-notice.js +157 -0
  68. package/src/lib/app-utils/leaving-notice.js.map +1 -0
  69. package/src/lib/app-utils/llms-txt.d.ts +20 -0
  70. package/src/lib/app-utils/llms-txt.js +7 -1
  71. package/src/lib/app-utils/llms-txt.js.map +1 -1
  72. package/src/lib/app-utils/media-asset-facts.d.ts +16 -1
  73. package/src/lib/app-utils/media-asset-facts.js +40 -13
  74. package/src/lib/app-utils/media-asset-facts.js.map +1 -1
  75. package/src/lib/app-utils/media-bandwidth.d.ts +52 -0
  76. package/src/lib/app-utils/media-bandwidth.js +94 -0
  77. package/src/lib/app-utils/media-bandwidth.js.map +1 -0
  78. package/src/lib/app-utils/media-ref.d.ts +241 -33
  79. package/src/lib/app-utils/media-ref.js +324 -43
  80. package/src/lib/app-utils/media-ref.js.map +1 -1
  81. package/src/lib/app-utils/media-src.d.ts +8 -8
  82. package/src/lib/app-utils/media-src.js +27 -11
  83. package/src/lib/app-utils/media-src.js.map +1 -1
  84. package/src/lib/app-utils/media-takedown-reach.d.ts +4 -1
  85. package/src/lib/app-utils/media-takedown-reach.js +6 -3
  86. package/src/lib/app-utils/media-takedown-reach.js.map +1 -1
  87. package/src/lib/app-utils/notifications.d.ts +1 -1
  88. package/src/lib/app-utils/notifications.js +2 -0
  89. package/src/lib/app-utils/notifications.js.map +1 -1
  90. package/src/lib/app-utils/operator-alerts.js +17 -0
  91. package/src/lib/app-utils/operator-alerts.js.map +1 -1
  92. package/src/lib/app-utils/organizations.d.ts +51 -2
  93. package/src/lib/app-utils/organizations.js +56 -3
  94. package/src/lib/app-utils/organizations.js.map +1 -1
  95. package/src/lib/app-utils/page-record-sources.d.ts +87 -0
  96. package/src/lib/app-utils/page-record-sources.js +53 -0
  97. package/src/lib/app-utils/page-record-sources.js.map +1 -0
  98. package/src/lib/app-utils/paid-media-source.d.ts +3 -7
  99. package/src/lib/app-utils/paid-media-source.js +5 -19
  100. package/src/lib/app-utils/paid-media-source.js.map +1 -1
  101. package/src/lib/app-utils/person-erasure.d.ts +5 -2
  102. package/src/lib/app-utils/person-erasure.js.map +1 -1
  103. package/src/lib/app-utils/picklists.d.ts +187 -0
  104. package/src/lib/app-utils/picklists.js +320 -0
  105. package/src/lib/app-utils/picklists.js.map +1 -0
  106. package/src/lib/app-utils/plan-entitlements.d.ts +220 -50
  107. package/src/lib/app-utils/plan-entitlements.js +309 -115
  108. package/src/lib/app-utils/plan-entitlements.js.map +1 -1
  109. package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
  110. package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
  111. package/src/lib/app-utils/release-flags.d.ts +1 -1
  112. package/src/lib/app-utils/release-flags.js +11 -0
  113. package/src/lib/app-utils/release-flags.js.map +1 -1
  114. package/src/lib/app-utils/rendered-widths.d.ts +121 -0
  115. package/src/lib/app-utils/rendered-widths.js +211 -0
  116. package/src/lib/app-utils/rendered-widths.js.map +1 -0
  117. package/src/lib/app-utils/repeat-sources.d.ts +2 -1
  118. package/src/lib/app-utils/repeat-sources.js.map +1 -1
  119. package/src/lib/app-utils/screen-link-context-value.d.ts +7 -0
  120. package/src/lib/app-utils/screen-link-context-value.js.map +1 -1
  121. package/src/lib/app-utils/screen-link-context.js +14 -2
  122. package/src/lib/app-utils/screen-link-context.js.map +1 -1
  123. package/src/lib/app-utils/screen-route.d.ts +157 -36
  124. package/src/lib/app-utils/screen-route.js +191 -41
  125. package/src/lib/app-utils/screen-route.js.map +1 -1
  126. package/src/lib/app-utils/seo-audit.d.ts +11 -1
  127. package/src/lib/app-utils/seo-audit.js +33 -13
  128. package/src/lib/app-utils/seo-audit.js.map +1 -1
  129. package/src/lib/app-utils/seo-keywords.d.ts +11 -0
  130. package/src/lib/app-utils/seo-keywords.js +19 -5
  131. package/src/lib/app-utils/seo-keywords.js.map +1 -1
  132. package/src/lib/app-utils/seo-page-facts.d.ts +47 -4
  133. package/src/lib/app-utils/seo-page-facts.js +136 -31
  134. package/src/lib/app-utils/seo-page-facts.js.map +1 -1
  135. package/src/lib/app-utils/seo-site-scan.d.ts +42 -4
  136. package/src/lib/app-utils/seo-site-scan.js +113 -12
  137. package/src/lib/app-utils/seo-site-scan.js.map +1 -1
  138. package/src/lib/app-utils/server.d.ts +5 -4
  139. package/src/lib/app-utils/server.js +14 -5
  140. package/src/lib/app-utils/server.js.map +1 -1
  141. package/src/lib/app-utils/site-icon-set.d.ts +195 -0
  142. package/src/lib/app-utils/site-icon-set.js +351 -0
  143. package/src/lib/app-utils/site-icon-set.js.map +1 -0
  144. package/src/lib/app-utils/site-interactions.d.ts +101 -4
  145. package/src/lib/app-utils/site-interactions.js +120 -4
  146. package/src/lib/app-utils/site-interactions.js.map +1 -1
  147. package/src/lib/app-utils/starter-template-nodes.d.ts +7 -0
  148. package/src/lib/app-utils/starter-template-nodes.js +3 -0
  149. package/src/lib/app-utils/starter-template-nodes.js.map +1 -1
  150. package/src/lib/app-utils/starter-templates.d.ts +5 -19
  151. package/src/lib/app-utils/starter-templates.js +5 -49
  152. package/src/lib/app-utils/starter-templates.js.map +1 -1
  153. package/src/lib/app-utils/transfer-launcher-context.d.ts +136 -0
  154. package/src/lib/app-utils/transfer-launcher-context.js +23 -0
  155. package/src/lib/app-utils/transfer-launcher-context.js.map +1 -0
  156. package/src/lib/app-utils/transfer-resume-import.d.ts +39 -0
  157. package/src/lib/app-utils/transfer-resume-import.js +128 -0
  158. package/src/lib/app-utils/transfer-resume-import.js.map +1 -0
  159. package/src/lib/app-utils/upgrade-proposal.d.ts +66 -0
  160. package/src/lib/app-utils/upgrade-proposal.js +95 -0
  161. package/src/lib/app-utils/upgrade-proposal.js.map +1 -0
  162. package/src/lib/app-utils/utc-month.d.ts +33 -0
  163. package/src/lib/app-utils/utc-month.js +35 -0
  164. package/src/lib/app-utils/utc-month.js.map +1 -0
  165. package/src/lib/app-utils/visitor-record-ceiling.d.ts +4 -4
  166. package/src/lib/app-utils/visitor-record-ceiling.js +4 -4
  167. package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -1
  168. package/src/lib/app-utils/wire-nodes.d.ts +39 -19
  169. package/src/lib/app-utils/wire-nodes.js +120 -34
  170. package/src/lib/app-utils/wire-nodes.js.map +1 -1
  171. package/src/lib/data-transfer/access.d.ts +74 -0
  172. package/src/lib/data-transfer/access.js +93 -0
  173. package/src/lib/data-transfer/access.js.map +1 -0
  174. package/src/lib/data-transfer/derive.d.ts +246 -0
  175. package/src/lib/data-transfer/derive.js +1007 -0
  176. package/src/lib/data-transfer/derive.js.map +1 -0
  177. package/src/lib/data-transfer/export-file.d.ts +46 -0
  178. package/src/lib/data-transfer/export-file.js +146 -0
  179. package/src/lib/data-transfer/export-file.js.map +1 -0
  180. package/src/lib/data-transfer/field-catalog.d.ts +134 -0
  181. package/src/lib/data-transfer/field-catalog.js +278 -0
  182. package/src/lib/data-transfer/field-catalog.js.map +1 -0
  183. package/src/lib/data-transfer/header-match.d.ts +129 -0
  184. package/src/lib/data-transfer/header-match.js +367 -0
  185. package/src/lib/data-transfer/header-match.js.map +1 -0
  186. package/src/lib/data-transfer/index.d.ts +34 -0
  187. package/src/lib/data-transfer/index.js +40 -0
  188. package/src/lib/data-transfer/index.js.map +1 -0
  189. package/src/lib/data-transfer/job.d.ts +190 -0
  190. package/src/lib/data-transfer/job.js +229 -0
  191. package/src/lib/data-transfer/job.js.map +1 -0
  192. package/src/lib/data-transfer/lookup.d.ts +45 -0
  193. package/src/lib/data-transfer/lookup.js +71 -0
  194. package/src/lib/data-transfer/lookup.js.map +1 -0
  195. package/src/lib/data-transfer/match.d.ts +99 -0
  196. package/src/lib/data-transfer/match.js +244 -0
  197. package/src/lib/data-transfer/match.js.map +1 -0
  198. package/src/lib/data-transfer/package-plan.d.ts +205 -0
  199. package/src/lib/data-transfer/package-plan.js +475 -0
  200. package/src/lib/data-transfer/package-plan.js.map +1 -0
  201. package/src/lib/data-transfer/package.d.ts +181 -0
  202. package/src/lib/data-transfer/package.js +426 -0
  203. package/src/lib/data-transfer/package.js.map +1 -0
  204. package/src/lib/data-transfer/picklist-map.d.ts +139 -0
  205. package/src/lib/data-transfer/picklist-map.js +271 -0
  206. package/src/lib/data-transfer/picklist-map.js.map +1 -0
  207. package/src/lib/data-transfer/plan.d.ts +176 -0
  208. package/src/lib/data-transfer/plan.js +451 -0
  209. package/src/lib/data-transfer/plan.js.map +1 -0
  210. package/src/lib/data-transfer/policy.d.ts +170 -0
  211. package/src/lib/data-transfer/policy.js +378 -0
  212. package/src/lib/data-transfer/policy.js.map +1 -0
  213. package/src/lib/data-transfer/resource.d.ts +211 -0
  214. package/src/lib/data-transfer/resource.js +241 -0
  215. package/src/lib/data-transfer/resource.js.map +1 -0
  216. package/src/lib/data-transfer/review.d.ts +70 -0
  217. package/src/lib/data-transfer/review.js +233 -0
  218. package/src/lib/data-transfer/review.js.map +1 -0
  219. package/src/lib/data-transfer/similarity.d.ts +40 -0
  220. package/src/lib/data-transfer/similarity.js +106 -0
  221. package/src/lib/data-transfer/similarity.js.map +1 -0
  222. package/src/lib/data-transfer/site-package.d.ts +365 -0
  223. package/src/lib/data-transfer/site-package.js +1077 -0
  224. package/src/lib/data-transfer/site-package.js.map +1 -0
  225. package/src/lib/data-transfer/source.d.ts +74 -0
  226. package/src/lib/data-transfer/source.js +293 -0
  227. package/src/lib/data-transfer/source.js.map +1 -0
  228. package/src/lib/data-transfer/transfer-api.d.ts +898 -0
  229. package/src/lib/data-transfer/transfer-api.js +107 -0
  230. package/src/lib/data-transfer/transfer-api.js.map +1 -0
  231. package/src/lib/foundation/definitions/org-billing.types.d.ts +31 -0
  232. package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
  233. package/src/lib/foundation/definitions/organization.types.d.ts +42 -1
  234. package/src/lib/foundation/definitions/organization.types.js.map +1 -1
  235. package/src/lib/foundation/definitions/platform.types.d.ts +6 -4
  236. package/src/lib/foundation/definitions/platform.types.js.map +1 -1
  237. package/src/lib/foundation/index.d.ts +1 -1
  238. package/src/lib/foundation/index.js.map +1 -1
  239. package/src/lib/plugin-manager/feature-plugins.d.ts +91 -2
  240. package/src/lib/plugin-manager/feature-plugins.js +48 -3
  241. package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
  242. package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +56 -0
  243. package/src/lib/plugin-manager/first-party-plugins.generated.js +1132 -27
  244. package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
  245. package/src/lib/plugin-manager/index.d.ts +0 -1
  246. package/src/lib/plugin-manager/index.js +0 -1
  247. package/src/lib/plugin-manager/index.js.map +1 -1
  248. package/src/lib/plugin-manager/interaction-recipes.d.ts +142 -0
  249. package/src/lib/plugin-manager/interaction-recipes.js +104 -0
  250. package/src/lib/plugin-manager/interaction-recipes.js.map +1 -0
  251. package/src/lib/plugin-manager/interaction-step-checks.d.ts +66 -0
  252. package/src/lib/plugin-manager/interaction-step-checks.js +86 -0
  253. package/src/lib/plugin-manager/interaction-step-checks.js.map +1 -0
  254. package/src/lib/plugin-manager/plugin-artifact-types.d.ts +235 -0
  255. package/src/lib/plugin-manager/plugin-artifact-types.js +99 -0
  256. package/src/lib/plugin-manager/plugin-artifact-types.js.map +1 -0
  257. package/src/lib/plugin-manager/plugin-contact-capture.d.ts +8 -0
  258. package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -1
  259. package/src/lib/plugin-manager/plugin-conversion-credit.d.ts +216 -0
  260. package/src/lib/plugin-manager/plugin-conversion-credit.js +91 -0
  261. package/src/lib/plugin-manager/plugin-conversion-credit.js.map +1 -0
  262. package/src/lib/plugin-manager/plugin-entity-pickers.d.ts +83 -0
  263. package/src/lib/plugin-manager/plugin-entity-pickers.js +87 -0
  264. package/src/lib/plugin-manager/plugin-entity-pickers.js.map +1 -0
  265. package/src/lib/plugin-manager/plugin-host-resources.d.ts +6 -0
  266. package/src/lib/plugin-manager/plugin-host-resources.js +6 -1
  267. package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -1
  268. package/src/lib/plugin-manager/plugin-intake-gates.d.ts +75 -0
  269. package/src/lib/plugin-manager/plugin-intake-gates.js +49 -0
  270. package/src/lib/plugin-manager/plugin-intake-gates.js.map +1 -0
  271. package/src/lib/plugin-manager/plugin-jobs.d.ts +5 -5
  272. package/src/lib/plugin-manager/plugin-jobs.js +7 -7
  273. package/src/lib/plugin-manager/plugin-jobs.js.map +1 -1
  274. package/src/lib/plugin-manager/plugin-live-paths.d.ts +70 -0
  275. package/src/lib/plugin-manager/plugin-live-paths.js +66 -0
  276. package/src/lib/plugin-manager/plugin-live-paths.js.map +1 -0
  277. package/src/lib/plugin-manager/plugin-org-erasure.d.ts +3 -2
  278. package/src/lib/plugin-manager/plugin-org-erasure.js +30 -5
  279. package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
  280. package/src/lib/plugin-manager/plugin-person-erasure.d.ts +68 -9
  281. package/src/lib/plugin-manager/plugin-person-erasure.js +196 -51
  282. package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -1
  283. package/src/lib/plugin-manager/plugin-person-records.d.ts +275 -0
  284. package/src/lib/plugin-manager/plugin-person-records.js +107 -0
  285. package/src/lib/plugin-manager/plugin-person-records.js.map +1 -0
  286. package/src/lib/plugin-manager/plugin-record-counts.d.ts +76 -0
  287. package/src/lib/plugin-manager/plugin-record-counts.js +49 -0
  288. package/src/lib/plugin-manager/plugin-record-counts.js.map +1 -0
  289. package/src/lib/plugin-manager/plugin-record-email-state.d.ts +26 -0
  290. package/src/lib/plugin-manager/plugin-record-email-state.js +16 -0
  291. package/src/lib/plugin-manager/plugin-record-email-state.js.map +1 -1
  292. package/src/lib/plugin-manager/plugin-record-index.d.ts +10 -0
  293. package/src/lib/plugin-manager/plugin-record-index.js.map +1 -1
  294. package/src/lib/plugin-manager/plugin-record-lists.d.ts +86 -6
  295. package/src/lib/plugin-manager/plugin-record-lists.js +42 -5
  296. package/src/lib/plugin-manager/plugin-record-lists.js.map +1 -1
  297. package/src/lib/plugin-manager/plugin-record-origin.d.ts +79 -0
  298. package/src/lib/plugin-manager/plugin-record-origin.js +46 -0
  299. package/src/lib/plugin-manager/plugin-record-origin.js.map +1 -0
  300. package/src/lib/plugin-manager/plugin-record-pages.d.ts +37 -0
  301. package/src/lib/plugin-manager/plugin-record-pages.js +52 -0
  302. package/src/lib/plugin-manager/plugin-record-pages.js.map +1 -0
  303. package/src/lib/plugin-manager/plugin-record-timeline.d.ts +60 -0
  304. package/src/lib/plugin-manager/plugin-record-timeline.js +16 -0
  305. package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -1
  306. package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +5 -5
  307. package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -1
  308. package/src/lib/plugin-manager/plugin-revocations.d.ts +64 -0
  309. package/src/lib/plugin-manager/plugin-revocations.js +47 -0
  310. package/src/lib/plugin-manager/plugin-revocations.js.map +1 -0
  311. package/src/lib/plugin-manager/plugin-send-tallies.d.ts +69 -0
  312. package/src/lib/plugin-manager/plugin-send-tallies.js +45 -0
  313. package/src/lib/plugin-manager/plugin-send-tallies.js.map +1 -0
  314. package/src/lib/plugin-manager/plugin-server-steps.d.ts +170 -0
  315. package/src/lib/plugin-manager/plugin-server-steps.js +116 -0
  316. package/src/lib/plugin-manager/plugin-server-steps.js.map +1 -0
  317. package/src/lib/plugin-manager/plugin-site-bundle.d.ts +40 -0
  318. package/src/lib/plugin-manager/plugin-site-bundle.js +4 -0
  319. package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -1
  320. package/src/lib/plugin-manager/plugin-site-export.d.ts +57 -1
  321. package/src/lib/plugin-manager/plugin-site-export.js +23 -10
  322. package/src/lib/plugin-manager/plugin-site-export.js.map +1 -1
  323. package/src/lib/plugin-manager/plugin-sitemap-readers.d.ts +146 -0
  324. package/src/lib/plugin-manager/plugin-sitemap-readers.js +110 -0
  325. package/src/lib/plugin-manager/plugin-sitemap-readers.js.map +1 -0
  326. package/src/lib/plugin-manager/plugin-transfer-resources.d.ts +714 -0
  327. package/src/lib/plugin-manager/plugin-transfer-resources.js +443 -0
  328. package/src/lib/plugin-manager/plugin-transfer-resources.js.map +1 -0
  329. package/src/lib/plugin-manager/plugin-usage-axes.d.ts +54 -5
  330. package/src/lib/plugin-manager/plugin-usage-axes.js +11 -3
  331. package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -1
  332. package/src/lib/plugin-manager/plugin-user-erasure.js +9 -1
  333. package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -1
  334. package/src/lib/plugin-manager/plugin-visitor-doors.d.ts +104 -0
  335. package/src/lib/plugin-manager/plugin-visitor-doors.js +108 -0
  336. package/src/lib/plugin-manager/plugin-visitor-doors.js.map +1 -0
  337. package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
  338. package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
  339. package/src/lib/plugin-manager/repeat-rows.d.ts +5 -6
  340. package/src/lib/plugin-manager/repeat-rows.js.map +1 -1
  341. package/src/lib/app-utils/actions.d.ts +0 -310
  342. package/src/lib/app-utils/actions.js +0 -506
  343. package/src/lib/app-utils/actions.js.map +0 -1
  344. package/src/lib/app-utils/automation-placeholders.d.ts +0 -72
  345. package/src/lib/app-utils/automation-placeholders.js +0 -207
  346. package/src/lib/app-utils/automation-placeholders.js.map +0 -1
  347. package/src/lib/app-utils/dataset-models.d.ts +0 -339
  348. package/src/lib/app-utils/dataset-models.js +0 -722
  349. package/src/lib/app-utils/dataset-models.js.map +0 -1
  350. package/src/lib/app-utils/datasets.d.ts +0 -171
  351. package/src/lib/app-utils/datasets.js +0 -227
  352. package/src/lib/app-utils/datasets.js.map +0 -1
  353. package/src/lib/app-utils/form-abuse-ceiling.d.ts +0 -146
  354. package/src/lib/app-utils/form-abuse-ceiling.js +0 -158
  355. package/src/lib/app-utils/form-abuse-ceiling.js.map +0 -1
  356. package/src/lib/plugin-manager/order-fulfilment.d.ts +0 -142
  357. package/src/lib/plugin-manager/order-fulfilment.js +0 -104
  358. package/src/lib/plugin-manager/order-fulfilment.js.map +0 -1
@@ -1,72 +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 HostAction, type HostActionStep, type HostActionStepType } from './actions';
18
- /**
19
- * PLACEHOLDERS IN AN AUTOMATION (AGL-2919).
20
- *
21
- * A placeholder is a value a person still has to supply, written in square
22
- * brackets where the value belongs: `[newsletter]` where a list is named,
23
- * `[your phone number]` in an email's body. An automation drafted for somebody
24
- * to review carries one wherever the draft could not name a real record or
25
- * did not know a fact.
26
- *
27
- * Square brackets because they are inert everywhere an automation reads a
28
- * value. A bracketed list, campaign or workflow name matches no record by
29
- * name, so the step reports the unknown name in the run history rather than
30
- * acting on the wrong record; a bracketed condition value equals no field an
31
- * event carries, so a trigger never fires on a guess; and the Reference health
32
- * audit already reports a name that resolves to nothing.
33
- *
34
- * Only the fields a person types words into are read. Selectors, class names,
35
- * HTML and scripts use brackets as syntax and never hold a placeholder.
36
- */
37
- /**
38
- * A bracketed placeholder inside a value. Not one followed by `(`, which is a
39
- * written link (`[our menu](https://…)`) rather than a gap, and never across a
40
- * line or longer than a phrase.
41
- */
42
- export declare const AUTOMATION_PLACEHOLDER_PATTERN: RegExp;
43
- /** The longest words a placeholder keeps. */
44
- export declare const AUTOMATION_PLACEHOLDER_MAX_CHARS = 100;
45
- /** The words inside the first placeholder in a value, or `null` when it holds none. */
46
- export declare function automationPlaceholderIn(value: unknown): string | null;
47
- /**
48
- * `words` as a placeholder: on one line, without brackets of their own, cut
49
- * to a phrase. Empty words still make a placeholder, so a value that must be
50
- * supplied is never written as an empty string a validator would refuse.
51
- */
52
- export declare function automationPlaceholder(words: string): string;
53
- /** What a placeholder stands in for, in the words the editor labels that field with. */
54
- export type AutomationPlaceholderField = 'condition' | 'list' | 'campaign' | 'workflow' | 'webhook' | 'dataset' | 'overlay' | 'subject' | 'body' | 'title' | 'message' | 'tag';
55
- export interface AutomationPlaceholder {
56
- /** The 1-based step holding it; `null` for the trigger's own conditions. */
57
- step: number | null;
58
- field: AutomationPlaceholderField;
59
- /** The words inside the brackets. */
60
- text: string;
61
- }
62
- /**
63
- * Each typed field a step type holds, and the placeholder field it reports
64
- * as. A step type absent here holds no field a person writes words into.
65
- */
66
- export declare const AUTOMATION_PLACEHOLDER_FIELDS: Readonly<Partial<Record<HostActionStepType, ReadonlyArray<readonly [string, AutomationPlaceholderField]>>>>;
67
- /** The placeholders one step holds, in its fields' order. */
68
- export declare function automationStepPlaceholders(step: HostActionStep, index: number): AutomationPlaceholder[];
69
- /** Every placeholder an automation holds: its trigger's conditions first, then each step's. */
70
- export declare function automationPlaceholders(action: Pick<HostAction, 'trigger' | 'steps'> | null | undefined): AutomationPlaceholder[];
71
- /** One placeholder as a person reads it: where it is, and what it stands in for. */
72
- export declare function describeAutomationPlaceholder(placeholder: AutomationPlaceholder): string;
@@ -1,207 +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
- */ import { normalizeTriggerConditions } from "./actions.js";
17
- /**
18
- * PLACEHOLDERS IN AN AUTOMATION (AGL-2919).
19
- *
20
- * A placeholder is a value a person still has to supply, written in square
21
- * brackets where the value belongs: `[newsletter]` where a list is named,
22
- * `[your phone number]` in an email's body. An automation drafted for somebody
23
- * to review carries one wherever the draft could not name a real record or
24
- * did not know a fact.
25
- *
26
- * Square brackets because they are inert everywhere an automation reads a
27
- * value. A bracketed list, campaign or workflow name matches no record by
28
- * name, so the step reports the unknown name in the run history rather than
29
- * acting on the wrong record; a bracketed condition value equals no field an
30
- * event carries, so a trigger never fires on a guess; and the Reference health
31
- * audit already reports a name that resolves to nothing.
32
- *
33
- * Only the fields a person types words into are read. Selectors, class names,
34
- * HTML and scripts use brackets as syntax and never hold a placeholder.
35
- */ /**
36
- * A bracketed placeholder inside a value. Not one followed by `(`, which is a
37
- * written link (`[our menu](https://…)`) rather than a gap, and never across a
38
- * line or longer than a phrase.
39
- */ export const AUTOMATION_PLACEHOLDER_PATTERN = /\[([^[\]\n]{1,120})\](?!\()/;
40
- /** The longest words a placeholder keeps. */ export const AUTOMATION_PLACEHOLDER_MAX_CHARS = 100;
41
- /** The words inside the first placeholder in a value, or `null` when it holds none. */ export function automationPlaceholderIn(value) {
42
- var _match_;
43
- if (typeof value !== 'string') return null;
44
- const match = AUTOMATION_PLACEHOLDER_PATTERN.exec(value);
45
- const words = match == null ? void 0 : (_match_ = match[1]) == null ? void 0 : _match_.trim();
46
- return words ? words : null;
47
- }
48
- /**
49
- * `words` as a placeholder: on one line, without brackets of their own, cut
50
- * to a phrase. Empty words still make a placeholder, so a value that must be
51
- * supplied is never written as an empty string a validator would refuse.
52
- */ export function automationPlaceholder(words) {
53
- const clean = words.replace(/[[\]\n\r]+/g, ' ').replace(/\s+/g, ' ').trim().slice(0, AUTOMATION_PLACEHOLDER_MAX_CHARS).trim();
54
- return `[${clean || 'to fill in'}]`;
55
- }
56
- /**
57
- * Each typed field a step type holds, and the placeholder field it reports
58
- * as. A step type absent here holds no field a person writes words into.
59
- */ export const AUTOMATION_PLACEHOLDER_FIELDS = {
60
- enrollList: [
61
- [
62
- 'listName',
63
- 'list'
64
- ]
65
- ],
66
- assignCampaign: [
67
- [
68
- 'campaignName',
69
- 'campaign'
70
- ]
71
- ],
72
- runWorkflow: [
73
- [
74
- 'workflowName',
75
- 'workflow'
76
- ]
77
- ],
78
- webhookPost: [
79
- [
80
- 'webhookName',
81
- 'webhook'
82
- ]
83
- ],
84
- datasetAppend: [
85
- [
86
- 'datasetName',
87
- 'dataset'
88
- ]
89
- ],
90
- updateDataset: [
91
- [
92
- 'datasetName',
93
- 'dataset'
94
- ]
95
- ],
96
- showOverlay: [
97
- [
98
- 'overlayName',
99
- 'overlay'
100
- ]
101
- ],
102
- sendEmail: [
103
- [
104
- 'subject',
105
- 'subject'
106
- ],
107
- [
108
- 'body',
109
- 'body'
110
- ]
111
- ],
112
- notifyAdmins: [
113
- [
114
- 'title',
115
- 'title'
116
- ],
117
- [
118
- 'body',
119
- 'body'
120
- ]
121
- ],
122
- siteAlert: [
123
- [
124
- 'message',
125
- 'message'
126
- ]
127
- ],
128
- createCrmTask: [
129
- [
130
- 'title',
131
- 'title'
132
- ]
133
- ],
134
- logCrmActivity: [
135
- [
136
- 'body',
137
- 'body'
138
- ]
139
- ],
140
- addContactTag: [
141
- [
142
- 'tag',
143
- 'tag'
144
- ]
145
- ]
146
- };
147
- /** The placeholders one step holds, in its fields' order. */ export function automationStepPlaceholders(step, index) {
148
- var _ref, _AUTOMATION_PLACEHOLDER_FIELDS_step_type;
149
- var _step_when;
150
- const found = [];
151
- const number = index + 1;
152
- for (const clause of (_ref = (_step_when = step.when) == null ? void 0 : _step_when.conditions) != null ? _ref : []){
153
- const text = automationPlaceholderIn(clause == null ? void 0 : clause.value);
154
- if (text) found.push({
155
- step: number,
156
- field: 'condition',
157
- text
158
- });
159
- }
160
- for (const [key, field] of (_AUTOMATION_PLACEHOLDER_FIELDS_step_type = AUTOMATION_PLACEHOLDER_FIELDS[step.type]) != null ? _AUTOMATION_PLACEHOLDER_FIELDS_step_type : []){
161
- const text = automationPlaceholderIn(step[key]);
162
- if (text) found.push({
163
- step: number,
164
- field,
165
- text
166
- });
167
- }
168
- return found;
169
- }
170
- /** Every placeholder an automation holds: its trigger's conditions first, then each step's. */ export function automationPlaceholders(action) {
171
- var _action_steps;
172
- if (!action) return [];
173
- const found = [];
174
- for (const condition of normalizeTriggerConditions(action.trigger)){
175
- const text = automationPlaceholderIn(condition == null ? void 0 : condition.value);
176
- if (text) found.push({
177
- step: null,
178
- field: 'condition',
179
- text
180
- });
181
- }
182
- ;
183
- ((_action_steps = action.steps) != null ? _action_steps : []).forEach((step, index)=>{
184
- if (step) found.push(...automationStepPlaceholders(step, index));
185
- });
186
- return found;
187
- }
188
- /** One placeholder as a person reads it: where it is, and what it stands in for. */ export function describeAutomationPlaceholder(placeholder) {
189
- const where = placeholder.step === null ? 'The trigger' : `Step ${placeholder.step}`;
190
- const what = {
191
- condition: 'a condition value',
192
- list: 'the list',
193
- campaign: 'the campaign',
194
- workflow: 'the workflow',
195
- webhook: 'the webhook',
196
- dataset: 'the dataset',
197
- overlay: 'the popup or bar',
198
- subject: 'the subject',
199
- body: 'the text',
200
- title: 'the title',
201
- message: 'the message',
202
- tag: 'the tag'
203
- };
204
- return `${where}: ${what[placeholder.field]} (“${placeholder.text}”)`;
205
- }
206
-
207
- //# sourceMappingURL=automation-placeholders.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/automation-placeholders.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 type HostAction,\n type HostActionStep,\n type HostActionStepType,\n normalizeTriggerConditions,\n} from './actions'\n\n/**\n * PLACEHOLDERS IN AN AUTOMATION (AGL-2919).\n *\n * A placeholder is a value a person still has to supply, written in square\n * brackets where the value belongs: `[newsletter]` where a list is named,\n * `[your phone number]` in an email's body. An automation drafted for somebody\n * to review carries one wherever the draft could not name a real record or\n * did not know a fact.\n *\n * Square brackets because they are inert everywhere an automation reads a\n * value. A bracketed list, campaign or workflow name matches no record by\n * name, so the step reports the unknown name in the run history rather than\n * acting on the wrong record; a bracketed condition value equals no field an\n * event carries, so a trigger never fires on a guess; and the Reference health\n * audit already reports a name that resolves to nothing.\n *\n * Only the fields a person types words into are read. Selectors, class names,\n * HTML and scripts use brackets as syntax and never hold a placeholder.\n */\n\n/**\n * A bracketed placeholder inside a value. Not one followed by `(`, which is a\n * written link (`[our menu](https://…)`) rather than a gap, and never across a\n * line or longer than a phrase.\n */\nexport const AUTOMATION_PLACEHOLDER_PATTERN = /\\[([^[\\]\\n]{1,120})\\](?!\\()/\n\n/** The longest words a placeholder keeps. */\nexport const AUTOMATION_PLACEHOLDER_MAX_CHARS = 100\n\n/** The words inside the first placeholder in a value, or `null` when it holds none. */\nexport function automationPlaceholderIn(value: unknown): string | null {\n if (typeof value !== 'string') return null\n const match = AUTOMATION_PLACEHOLDER_PATTERN.exec(value)\n const words = match?.[1]?.trim()\n return words ? words : null\n}\n\n/**\n * `words` as a placeholder: on one line, without brackets of their own, cut\n * to a phrase. Empty words still make a placeholder, so a value that must be\n * supplied is never written as an empty string a validator would refuse.\n */\nexport function automationPlaceholder(words: string): string {\n const clean = words\n .replace(/[[\\]\\n\\r]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim()\n .slice(0, AUTOMATION_PLACEHOLDER_MAX_CHARS)\n .trim()\n return `[${clean || 'to fill in'}]`\n}\n\n/** What a placeholder stands in for, in the words the editor labels that field with. */\nexport type AutomationPlaceholderField =\n | 'condition'\n | 'list'\n | 'campaign'\n | 'workflow'\n | 'webhook'\n | 'dataset'\n | 'overlay'\n | 'subject'\n | 'body'\n | 'title'\n | 'message'\n | 'tag'\n\nexport interface AutomationPlaceholder {\n /** The 1-based step holding it; `null` for the trigger's own conditions. */\n step: number | null\n field: AutomationPlaceholderField\n /** The words inside the brackets. */\n text: string\n}\n\n/**\n * Each typed field a step type holds, and the placeholder field it reports\n * as. A step type absent here holds no field a person writes words into.\n */\nexport const AUTOMATION_PLACEHOLDER_FIELDS: Readonly<\n Partial<Record<HostActionStepType, ReadonlyArray<readonly [string, AutomationPlaceholderField]>>>\n> = {\n enrollList: [['listName', 'list']],\n assignCampaign: [['campaignName', 'campaign']],\n runWorkflow: [['workflowName', 'workflow']],\n webhookPost: [['webhookName', 'webhook']],\n datasetAppend: [['datasetName', 'dataset']],\n updateDataset: [['datasetName', 'dataset']],\n showOverlay: [['overlayName', 'overlay']],\n sendEmail: [\n ['subject', 'subject'],\n ['body', 'body'],\n ],\n notifyAdmins: [\n ['title', 'title'],\n ['body', 'body'],\n ],\n siteAlert: [['message', 'message']],\n createCrmTask: [['title', 'title']],\n logCrmActivity: [['body', 'body']],\n addContactTag: [['tag', 'tag']],\n}\n\n/** The placeholders one step holds, in its fields' order. */\nexport function automationStepPlaceholders(\n step: HostActionStep,\n index: number,\n): AutomationPlaceholder[] {\n const found: AutomationPlaceholder[] = []\n const number = index + 1\n for (const clause of step.when?.conditions ?? []) {\n const text = automationPlaceholderIn(clause?.value)\n if (text) found.push({ step: number, field: 'condition', text })\n }\n for (const [key, field] of AUTOMATION_PLACEHOLDER_FIELDS[step.type] ?? []) {\n const text = automationPlaceholderIn((step as unknown as Record<string, unknown>)[key])\n if (text) found.push({ step: number, field, text })\n }\n return found\n}\n\n/** Every placeholder an automation holds: its trigger's conditions first, then each step's. */\nexport function automationPlaceholders(\n action: Pick<HostAction, 'trigger' | 'steps'> | null | undefined,\n): AutomationPlaceholder[] {\n if (!action) return []\n const found: AutomationPlaceholder[] = []\n for (const condition of normalizeTriggerConditions(action.trigger)) {\n const text = automationPlaceholderIn(condition?.value)\n if (text) found.push({ step: null, field: 'condition', text })\n }\n ;(action.steps ?? []).forEach((step, index) => {\n if (step) found.push(...automationStepPlaceholders(step, index))\n })\n return found\n}\n\n/** One placeholder as a person reads it: where it is, and what it stands in for. */\nexport function describeAutomationPlaceholder(placeholder: AutomationPlaceholder): string {\n const where = placeholder.step === null ? 'The trigger' : `Step ${placeholder.step}`\n const what: Record<AutomationPlaceholderField, string> = {\n condition: 'a condition value',\n list: 'the list',\n campaign: 'the campaign',\n workflow: 'the workflow',\n webhook: 'the webhook',\n dataset: 'the dataset',\n overlay: 'the popup or bar',\n subject: 'the subject',\n body: 'the text',\n title: 'the title',\n message: 'the message',\n tag: 'the tag',\n }\n return `${where}: ${what[placeholder.field]} (“${placeholder.text}”)`\n}\n"],"names":["normalizeTriggerConditions","AUTOMATION_PLACEHOLDER_PATTERN","AUTOMATION_PLACEHOLDER_MAX_CHARS","automationPlaceholderIn","value","match","exec","words","trim","automationPlaceholder","clean","replace","slice","AUTOMATION_PLACEHOLDER_FIELDS","enrollList","assignCampaign","runWorkflow","webhookPost","datasetAppend","updateDataset","showOverlay","sendEmail","notifyAdmins","siteAlert","createCrmTask","logCrmActivity","addContactTag","automationStepPlaceholders","step","index","found","number","clause","when","conditions","text","push","field","key","type","automationPlaceholders","action","condition","trigger","steps","forEach","describeAutomationPlaceholder","placeholder","where","what","list","campaign","workflow","webhook","dataset","overlay","subject","body","title","message","tag"],"mappings":"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"}
@@ -1,339 +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 DatasetFieldEntry } from './datasets';
18
- /**
19
- * Dataset models (AGL-177): the runtime promotion of the type-level
20
- * blueprint in `libs/shared/data/types/src/lib/dod.ts` (kept as the
21
- * referenced design doc — this module is the single runtime source of
22
- * truth). A model lives on the dataset doc
23
- * (`orgs/{orgId}/datasets/{id}.model`) and drives the typed editor, import
24
- * and site-restore validation, and every record write — the console, `/v1`,
25
- * a bound form's submission and an automation step — through the shared
26
- * `validateDocument`/`coerceDocumentValues` pair so they can't disagree. The
27
- * form and the automation step reach the pair through
28
- * `prepareDatasetRecordWrite` (AGL-2773).
29
- *
30
- * Storage conventions (Firestore-safe): timestamps as epoch millis
31
- * numbers, coordinates as `{ latitude, longitude }`, `sorted` as arrays,
32
- * `map` as plain objects, references as target-document id strings.
33
- */
34
- /** dod.ts `FT.Tag` vocabulary plus `reference` (AGL-180 builds on it). */
35
- export type DatasetFieldType = 'bool' | 'bytes' | 'timestamp' | 'float' | 'int32' | 'int64' | 'nil' | 'text' | 'coordinates' | 'map' | 'sorted' | 'reference';
36
- export declare const DATASET_FIELD_TYPES: DatasetFieldType[];
37
- /** Display names, mirroring dod.ts `lbl`. */
38
- export declare const DATASET_FIELD_TYPE_LABELS: Record<DatasetFieldType, string>;
39
- /**
40
- * Plain-JSON validation vocabulary (the dod.ts `Eval` shape, extended
41
- * with min/max and options, serialized flat instead of enum-keyed).
42
- */
43
- export interface DatasetFieldValidation {
44
- required?: boolean;
45
- /** Source of a RegExp applied to text values. */
46
- regex?: string;
47
- /** Numbers/timestamps: value bound. Text: length bound. */
48
- min?: number;
49
- max?: number;
50
- /** Enum: value must be one of these (text fields). */
51
- options?: string[];
52
- }
53
- export interface DatasetFieldDefinition {
54
- /**
55
- * Human-facing display label only. The stable reference id is the KEY in
56
- * `DatasetModel.fields` (and `order`), NOT this name — bindings resolve
57
- * `{{item.<fieldId>}}` against that key. The default id is derived from
58
- * this name once at creation but is user-overridable (AGL-578); renaming
59
- * the label afterwards never changes the id.
60
- */
61
- name: string;
62
- type: DatasetFieldType;
63
- /**
64
- * Plugin-declared custom type riding this base type (AGL-434) — see
65
- * plugin-manager/custom-fields. Unknown names degrade to the base type.
66
- */
67
- customType?: string;
68
- description?: string;
69
- required?: boolean;
70
- /** Default applied by editors when creating documents; never coerced. */
71
- default?: unknown;
72
- validation?: DatasetFieldValidation;
73
- /**
74
- * Reference fields (AGL-180): target collection + display field id.
75
- * `multiple` stores a `sorted` array of FKeys (small-cardinality
76
- * many-to-many per the dod.ts guidance); `onDelete` is the referenced-
77
- * document delete policy (default `setNull` — never cascade in v2).
78
- */
79
- reference?: {
80
- datasetId: string;
81
- displayFieldId?: string;
82
- multiple?: boolean;
83
- onDelete?: 'restrict' | 'setNull';
84
- };
85
- }
86
- export interface DatasetModel {
87
- fields: Record<string, DatasetFieldDefinition>;
88
- /** Field ids in display order. */
89
- order: string[];
90
- }
91
- /**
92
- * Migration shim (v1 → v2): datasets created before models carry flat
93
- * `fields: string[]` — derive a model where every column is an optional
94
- * text field whose id is the column name, so the editor and AGL-103
95
- * bindings keep working on unmigrated docs during rollout.
96
- */
97
- export declare function deriveModelFromFields(fields: string[]): DatasetModel;
98
- /**
99
- * Model from quick-creator entries (AGL-558): stable slug ids with the
100
- * human display names preserved — "Roast preference" → id
101
- * `roast_preference`, name "Roast preference".
102
- */
103
- export declare function modelFromFieldEntries(entries: readonly DatasetFieldEntry[]): DatasetModel;
104
- /** The dataset's model, deriving one from v1 `fields` when absent. */
105
- export declare function effectiveDatasetModel(dataset: {
106
- model?: DatasetModel;
107
- fields?: string[];
108
- }): DatasetModel;
109
- /**
110
- * Validates a document's values against a model, returning fieldId →
111
- * human-readable error (empty object = valid). Values are expected in
112
- * storage form (see the module doc); use `coerceDocumentValues` first
113
- * when starting from user input strings.
114
- */
115
- export declare function validateDocument(model: DatasetModel, values: Record<string, unknown>): Record<string, string>;
116
- /** Storage value → grid display string (AGL-179). */
117
- export declare function formatDatasetValue(field: DatasetFieldDefinition, value: unknown): string;
118
- /**
119
- * Storage value → form-input string (AGL-179): the inverse of
120
- * `coerceDocumentValues` for populating type-appropriate inputs
121
- * (timestamps as `datetime-local` values, coordinates as "lat, lon").
122
- */
123
- export declare function datasetValueToInput(field: DatasetFieldDefinition, value: unknown): string;
124
- /**
125
- * Coerces user-input strings (form fields, CSV cells) into storage form
126
- * per the field type. Unparseable input is passed through untouched so
127
- * `validateDocument` reports it instead of silently mangling it.
128
- */
129
- export declare function coerceDocumentValues(model: DatasetModel, input: Record<string, unknown>): Record<string, unknown>;
130
- /**
131
- * Every reference id a record holds, flattened out of its `reference` fields
132
- * into one de-duplicated list.
133
- *
134
- * A reference field stores either a single target id or — when
135
- * `reference.multiple` is set — an array of them, and a model may declare
136
- * several. Both shapes flatten into the same list because the question asked
137
- * of it is never "which field", it is "does this record still point at that
138
- * document".
139
- *
140
- * Fields are read from `order` UNIONED with the keys of `fields`. Every other
141
- * pass over a model walks `order` alone, which is right for anything the user
142
- * sees — but a reference declared without a display slot still holds a real
143
- * FKey, and an integrity index that skipped it would under-report.
144
- */
145
- export declare function datasetReferencedIds(model: DatasetModel, values: Record<string, unknown> | undefined): string[];
146
- /**
147
- * The integrity index a record write carries, so referential integrity can be
148
- * decided by a QUERY rather than by the rows a listener happened to fetch.
149
- *
150
- * Deleting a record has to answer "is anything still pointing at this?", and
151
- * `restrict` refuses the delete on a yes while `setNull` strips the FKey. That
152
- * question cannot be asked where the answer is stored: dataset fields are
153
- * user-defined, so `records.values` carries a deliberate index exemption in
154
- * `cloud/firebase-firestore.indexes.json` — auto-indexing an unbounded map
155
- * blows Firestore's per-document index-entry limit — and
156
- * `where('values.<fieldId>', '==', id)` is therefore FAILED_PRECONDITION.
157
- * Reading a page of records and filtering them in the browser answers only for
158
- * the rows in that page, which is a browse window standing in for a
159
- * correctness check: a reference held outside it reads as no reference at all,
160
- * the delete proceeds, and `restrict` silently fails to restrict.
161
- *
162
- * `referencedIds` is that same reference, denormalized to a top-level array
163
- * Firestore will index, so one `array-contains` reaches every record.
164
- *
165
- * ⚠️ OMITTED when a record references nothing, rather than written as `[]`.
166
- * `isNotEmpty` is served as `!= null` and an empty array is not null, so a
167
- * record stamped `[]` answers "holds a reference" for a dataset that holds
168
- * none.
169
- *
170
- * ⚠️ Spread this at EVERY write that sets a record's `values`. A write that
171
- * sets values without it leaves the index describing the PREVIOUS values, and
172
- * a stale integrity index is the exact failure it exists to prevent — with the
173
- * UI reporting the record as safe to delete. On a merging write use
174
- * `datasetIntegrityUpdate` instead: omission leaves a stale array in place
175
- * where clearing the last reference has to remove the field.
176
- */
177
- export declare function datasetIntegrityFields(model: DatasetModel, values: Record<string, unknown> | undefined): {
178
- referencedIds?: string[];
179
- filterKeys?: string[];
180
- filterValues?: DatasetFilterValues;
181
- };
182
- /**
183
- * `datasetIntegrityFields` for a MERGING write (`update`, `set` with
184
- * `mergeFields`), where leaving the field out preserves what is stored
185
- * rather than clearing it.
186
- *
187
- * A record whose last reference is cleared has to have the field REMOVED, or
188
- * it goes on answering the `array-contains` for a document it no longer points
189
- * at — a `restrict` that refuses a delete nothing is holding. `clear` is the
190
- * caller's delete sentinel: `deleteField()` in the web SDK,
191
- * `FieldValue.delete()` in the Admin SDK. It is passed in rather than imported
192
- * because this module is shared by both and must stay SDK-free. The filter
193
- * fields are cleared the same way, so a record emptied of every filterable
194
- * value stops answering the filters its old values did.
195
- *
196
- * ⚠️ `filterValues` is a MAP, and it is written WHOLE: `update` and
197
- * `mergeFields` replace a field outright, so a value cleared since the last
198
- * write leaves the map with it. `set(…, { merge: true })` does NOT — it merges
199
- * maps key by key and would keep the cleared value answering its old
200
- * equality — so a record write never uses it; list the fields in
201
- * `mergeFields` instead.
202
- */
203
- export declare function datasetIntegrityUpdate<TClear>(model: DatasetModel, values: Record<string, unknown> | undefined, clear: TClear): {
204
- referencedIds: string[] | TClear;
205
- filterKeys: string[] | TClear;
206
- filterValues: DatasetFilterValues | TClear;
207
- };
208
- /**
209
- * A dataset record's FILTER TOKENS: every word-level question the records
210
- * table can ask of a record, flattened into one array of strings Firestore
211
- * indexes on its own. Its twin, {@link datasetFilterValues}, holds the
212
- * equalities.
213
- *
214
- * ## Why these fields, and not the values
215
- *
216
- * A record's fields live under `values`, a user-defined, unbounded map that
217
- * the index configuration exempts from indexing — auto-indexing it can exceed
218
- * Firestore's per-document index-entry limit — so `where('values.<field>', …)`
219
- * is refused. A composite index per dataset would need an admin call per
220
- * dataset, runs into the project's composite-index cap, and is deleted by the
221
- * next `firestore:indexes` deploy of a file that does not list it.
222
- *
223
- * `filterKeys` and `filterValues` need none of that. Firestore's AUTOMATIC
224
- * single-field indexes serve `where('filterKeys', 'array-contains', token)`
225
- * and `where('filterValues.<field>', '==', value)`, and every automatic index
226
- * ends in the document name — so any number of those equalities and ONE
227
- * `array-contains`, under `orderBy(documentId())`, compose by index merging,
228
- * with no composite index and no index deploy, on any dataset of any project
229
- * (AGL-3321).
230
- *
231
- * ## The token grammar
232
- *
233
- * `f:<fieldId>=<value>` a field equals a value. Enum (a text field with
234
- * `validation.options`) values are kept exactly;
235
- * plain text is lower-cased, trimmed and clipped to
236
- * {@link DATASET_FILTER_VALUE_MAX} characters;
237
- * booleans are `true`/`false`; numbers are
238
- * `String(number)`; a `sorted` list contributes one
239
- * token per member.
240
- * `f:<fieldId>^<prefix>` a word of a plain text field starts with this.
241
- * `s:<prefix>` a word of ANY text value (enums and list members
242
- * included) starts with this — the quick search.
243
- *
244
- * Timestamps, references, maps, bytes, coordinates and nil fields carry no
245
- * field tokens: a timestamp is asked in ranges, which one token cannot serve,
246
- * and the rest are not asked about by value.
247
- *
248
- * The array is sorted, de-duplicated and capped at
249
- * {@link DATASET_FILTER_KEYS_MAX}. Past the cap, the `=` tokens are kept
250
- * first, then the per-field word prefixes, then the search prefixes, so a
251
- * very long record loses search reach before it loses exact matches.
252
- */
253
- export declare const DATASET_FILTER_KEYS_MAX = 500;
254
- /** Plain text values are clipped to this many characters in an `=` token. */
255
- export declare const DATASET_FILTER_VALUE_MAX = 64;
256
- /** Word prefixes run from 1 to this many characters. */
257
- export declare const DATASET_FILTER_PREFIX_MAX = 12;
258
- /** Only the first this-many words of a value contribute prefixes. */
259
- export declare const DATASET_FILTER_WORDS_MAX = 40;
260
- /** One clause of the records table's filter: `{ field, op, value }`. */
261
- export interface DatasetFilterClause {
262
- field: string;
263
- op: string;
264
- value: string;
265
- }
266
- /**
267
- * The words of a text value: split on anything that is not a letter or a
268
- * digit, lower-cased, at most {@link DATASET_FILTER_WORDS_MAX} of them.
269
- */
270
- export declare function datasetFilterWords(text: string): string[];
271
- /**
272
- * Plain text as its stored key — its `=` token's value and its
273
- * `filterValues` entry: lower-cased, trimmed, clipped to
274
- * {@link DATASET_FILTER_VALUE_MAX} characters. What the records table asks a
275
- * typed value to equal.
276
- */
277
- export declare function datasetFilterTextKey(value: string): string;
278
- /** The tokens described in {@link DATASET_FILTER_KEYS_MAX}'s comment. */
279
- export declare function datasetFilterKeys(model: DatasetModel, values: Record<string, unknown> | undefined): string[];
280
- /** A record's `filterValues`: field id → the value an equality asks for. */
281
- export type DatasetFilterValues = Record<string, string | number | boolean>;
282
- /**
283
- * The query path of a field's `filterValues` entry, or null for a field id
284
- * no path can name — such a field is stamped no entry, and the records table
285
- * offers it no equality (its `contains`, served by `filterKeys`, stands).
286
- */
287
- export declare function datasetFilterValuePath(fieldId: string): string | null;
288
- /**
289
- * A dataset record's FILTER VALUES: `{ [fieldId]: value }`, one scalar per
290
- * field an equality can be asked of, so the records table puts every
291
- * equality on its query (AGL-3321).
292
- *
293
- * enum text (`validation.options`) the value exactly, as its `=` token;
294
- * plain text {@link datasetFilterTextKey};
295
- * bool a boolean;
296
- * int32 / int64 / float a number.
297
- *
298
- * A form or an automation stores every value as text, so `'19.50'` is the
299
- * number 19.5 and `'true'` the boolean, as in {@link datasetFilterKeys}.
300
- * Fields with no value, and timestamps, lists, references, maps, bytes,
301
- * coordinates and nil fields, carry no entry: a list is asked by member
302
- * (`f:<id>=<member>` in `filterKeys`), and the rest are not asked about by
303
- * value.
304
- *
305
- * ## What it costs
306
- *
307
- * Unlike `values`, this map is NOT exempt from indexing — that is its whole
308
- * point. Each entry is a scalar and costs two automatic index entries
309
- * (ascending, descending), so a record costs at most two per model field —
310
- * bounded by the model's field count (the `/v1` API caps a model at 100
311
- * fields), far inside Firestore's 40,000 entries per document, where
312
- * `values` was unbounded because a `map` or `sorted` value may hold anything.
313
- */
314
- export declare function datasetFilterValues(model: DatasetModel, values: Record<string, unknown> | undefined): DatasetFilterValues;
315
- /**
316
- * The `filterKeys` token a word-level clause asks for, or null when it is
317
- * not one:
318
- *
319
- * - plain text `contains` → the `^` token of the value's FIRST word, so a
320
- * `contains` is a word-prefix match, not a mid-string one, and one word
321
- * of several is asked (the records table says so);
322
- * - list `contains` (and `equals`) → the member's `=` token;
323
- * - enum, boolean, number and plain text `equals` → the `=` token of the
324
- * value. The records table asks these of `filterValues` instead, which
325
- * composes with a `contains`; the token remains what the quick search and
326
- * older readers match.
327
- * - everything else — ranges, dates, `isEmpty`, `isAnyOf`, negations — null.
328
- *
329
- * `clause.field` is the field id. The operator names are the grid's: a
330
- * select's `equals`, a number's `=`, a boolean's `is`, a list's `contains`.
331
- */
332
- export declare function datasetFilterToken(model: DatasetModel, clause: DatasetFilterClause): string | null;
333
- /**
334
- * The quick-search token for one typed word, or null for a word with no
335
- * letters or digits. A word with punctuation inside it is asked by its first
336
- * run — split the search text with {@link datasetFilterWords} to ask for
337
- * every run.
338
- */
339
- export declare function datasetSearchToken(word: string): string | null;