@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
@@ -0,0 +1,95 @@
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
+ /**
18
+ * A plugin's records, listed and read for ANOTHER plugin (AGL-3080).
19
+ *
20
+ * A plugin that works over records it does not own — an AI job enriching a
21
+ * site's products, a composer binding the products an email names — used to
22
+ * read the owner's Firestore collection itself: the path, the field names,
23
+ * what "deleted" looks like. That is a plugin's storage reached around the
24
+ * plugin, invisible to `check:lib-boundaries` because a collection name is
25
+ * not an import, and it breaks the day the owner changes a field.
26
+ *
27
+ * So the owner publishes an INDEX for each record kind it keeps: `list` names
28
+ * the live records of a scope, `get` reads one — each as an id, a name and the
29
+ * FACTS the owner chooses to share, in a shape its registration documents.
30
+ * The reader never learns where the records are stored or what a deleted one
31
+ * looks like; the owner answers only live records.
32
+ *
33
+ * Its siblings: `plugin-record-cards` (how one record LOOKS, for a campaign
34
+ * sender) and `plugin-record-facts` (what a record SAYS, for a summary);
35
+ * `plugin-resource-drafts` is the WRITE side. This is the side that finds and
36
+ * reads records to work on.
37
+ *
38
+ * ## Not registered is an answer
39
+ *
40
+ * No index for a kind means no plugin keeps it in this process — the owner is
41
+ * not installed, or not loaded. A reader treats that as "none here" and says
42
+ * so, rather than reaching for the collection itself. Registered from the
43
+ * owner's server declarations, so every server process that boots the
44
+ * declarations has it.
45
+ *
46
+ * ## One index per kind
47
+ *
48
+ * A second plugin registering an index for a kind another plugin already
49
+ * keeps is refused, naming both, and the incumbent keeps serving.
50
+ */
51
+ /** One record, as its owner shares it. */
52
+ export interface PluginIndexedRecord {
53
+ id: string;
54
+ /** What a person calls it. Never empty: the owner leaves an unnamed record out. */
55
+ name: string;
56
+ /** What else the owner shares, in the shape its registration documents. */
57
+ facts: Readonly<Record<string, unknown>>;
58
+ }
59
+ /** Which records a reader asks about. */
60
+ export interface PluginRecordIndexScope {
61
+ /** The organization the records belong to, where the kind is org-scoped. */
62
+ orgId?: string | null;
63
+ /** The site the records belong to, where the kind is site-scoped. */
64
+ hostId?: string | null;
65
+ }
66
+ export interface PluginRecordIndex {
67
+ /**
68
+ * The live records of the scope, at most `limit`, in the owner's order.
69
+ * `truncated` says the scope holds more than were answered.
70
+ */
71
+ list(request: PluginRecordIndexScope & {
72
+ limit: number;
73
+ }): Promise<{
74
+ records: PluginIndexedRecord[];
75
+ truncated: boolean;
76
+ }>;
77
+ /** One live record, or `null` — gone, deleted, or not the scope's. */
78
+ get(request: PluginRecordIndexScope & {
79
+ id: string;
80
+ }): Promise<PluginIndexedRecord | null>;
81
+ }
82
+ export declare const PLUGIN_RECORD_INDEXES: import("./plugin-services").PluginServiceContract<PluginRecordIndex>;
83
+ /**
84
+ * Publishes the index for one record kind. The owner is the loader's marker
85
+ * when a register fn is running, else `options.pluginId`; with neither the
86
+ * registration throws. A kind another plugin keeps throws naming both.
87
+ */
88
+ export declare function registerPluginRecordIndex(kind: string, index: PluginRecordIndex, options?: {
89
+ pluginId?: string;
90
+ }): void;
91
+ /** The index for a kind, with the plugin that keeps it, or `null` when none does here. */
92
+ export declare function pluginRecordIndex(kind: string): {
93
+ pluginId: string;
94
+ index: PluginRecordIndex;
95
+ } | null;
@@ -0,0 +1,51 @@
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 { getRegisteringPluginId } from "../app-utils/registering-plugin.js";
17
+ import { definePluginServiceContract, registerPluginService, resolvePluginServices } from "./plugin-services.js";
18
+ export const PLUGIN_RECORD_INDEXES = definePluginServiceContract('core.record-index', {
19
+ multiple: true
20
+ });
21
+ /**
22
+ * Publishes the index for one record kind. The owner is the loader's marker
23
+ * when a register fn is running, else `options.pluginId`; with neither the
24
+ * registration throws. A kind another plugin keeps throws naming both.
25
+ */ export function registerPluginRecordIndex(kind, index, options) {
26
+ var _ref, _getRegisteringPluginId;
27
+ const key = kind.trim();
28
+ if (!key) throw new Error('a record index needs a record kind');
29
+ const pluginId = ((_ref = (_getRegisteringPluginId = getRegisteringPluginId()) != null ? _getRegisteringPluginId : options == null ? void 0 : options.pluginId) != null ? _ref : '').trim();
30
+ if (!pluginId) {
31
+ throw new Error(`the record index for "${key}" was registered with no owner`);
32
+ }
33
+ const incumbent = resolvePluginServices(PLUGIN_RECORD_INDEXES).find((entry)=>entry.key === key);
34
+ if (incumbent && incumbent.pluginId !== pluginId) {
35
+ throw new Error(`record kind "${key}" is already indexed by "${incumbent.pluginId}"; refused "${pluginId}"`);
36
+ }
37
+ registerPluginService(PLUGIN_RECORD_INDEXES, index, {
38
+ pluginId,
39
+ key
40
+ });
41
+ }
42
+ /** The index for a kind, with the plugin that keeps it, or `null` when none does here. */ export function pluginRecordIndex(kind) {
43
+ const key = kind.trim();
44
+ const entry = resolvePluginServices(PLUGIN_RECORD_INDEXES).find((one)=>one.key === key);
45
+ return entry ? {
46
+ pluginId: entry.pluginId,
47
+ index: entry.impl
48
+ } : null;
49
+ }
50
+
51
+ //# sourceMappingURL=plugin-record-index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-record-index.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 { getRegisteringPluginId } from '../app-utils/registering-plugin'\nimport {\n definePluginServiceContract,\n registerPluginService,\n resolvePluginServices,\n} from './plugin-services'\n\n/**\n * A plugin's records, listed and read for ANOTHER plugin (AGL-3080).\n *\n * A plugin that works over records it does not own — an AI job enriching a\n * site's products, a composer binding the products an email names — used to\n * read the owner's Firestore collection itself: the path, the field names,\n * what \"deleted\" looks like. That is a plugin's storage reached around the\n * plugin, invisible to `check:lib-boundaries` because a collection name is\n * not an import, and it breaks the day the owner changes a field.\n *\n * So the owner publishes an INDEX for each record kind it keeps: `list` names\n * the live records of a scope, `get` reads one — each as an id, a name and the\n * FACTS the owner chooses to share, in a shape its registration documents.\n * The reader never learns where the records are stored or what a deleted one\n * looks like; the owner answers only live records.\n *\n * Its siblings: `plugin-record-cards` (how one record LOOKS, for a campaign\n * sender) and `plugin-record-facts` (what a record SAYS, for a summary);\n * `plugin-resource-drafts` is the WRITE side. This is the side that finds and\n * reads records to work on.\n *\n * ## Not registered is an answer\n *\n * No index for a kind means no plugin keeps it in this process — the owner is\n * not installed, or not loaded. A reader treats that as \"none here\" and says\n * so, rather than reaching for the collection itself. Registered from the\n * owner's server declarations, so every server process that boots the\n * declarations has it.\n *\n * ## One index per kind\n *\n * A second plugin registering an index for a kind another plugin already\n * keeps is refused, naming both, and the incumbent keeps serving.\n */\n\n/** One record, as its owner shares it. */\nexport interface PluginIndexedRecord {\n id: string\n /** What a person calls it. Never empty: the owner leaves an unnamed record out. */\n name: string\n /** What else the owner shares, in the shape its registration documents. */\n facts: Readonly<Record<string, unknown>>\n}\n\n/** Which records a reader asks about. */\nexport interface PluginRecordIndexScope {\n /** The organization the records belong to, where the kind is org-scoped. */\n orgId?: string | null\n /** The site the records belong to, where the kind is site-scoped. */\n hostId?: string | null\n}\n\nexport interface PluginRecordIndex {\n /**\n * The live records of the scope, at most `limit`, in the owner's order.\n * `truncated` says the scope holds more than were answered.\n */\n list(\n request: PluginRecordIndexScope & { limit: number },\n ): Promise<{ records: PluginIndexedRecord[]; truncated: boolean }>\n /** One live record, or `null` — gone, deleted, or not the scope's. */\n get(request: PluginRecordIndexScope & { id: string }): Promise<PluginIndexedRecord | null>\n}\n\nexport const PLUGIN_RECORD_INDEXES = definePluginServiceContract<PluginRecordIndex>(\n 'core.record-index',\n { multiple: true },\n)\n\n/**\n * Publishes the index for one record kind. The owner is the loader's marker\n * when a register fn is running, else `options.pluginId`; with neither the\n * registration throws. A kind another plugin keeps throws naming both.\n */\nexport function registerPluginRecordIndex(\n kind: string,\n index: PluginRecordIndex,\n options?: { pluginId?: string },\n): void {\n const key = kind.trim()\n if (!key) throw new Error('a record index needs a record kind')\n const pluginId = (getRegisteringPluginId() ?? options?.pluginId ?? '').trim()\n if (!pluginId) {\n throw new Error(`the record index for \"${key}\" was registered with no owner`)\n }\n const incumbent = resolvePluginServices(PLUGIN_RECORD_INDEXES).find(\n (entry) => entry.key === key,\n )\n if (incumbent && incumbent.pluginId !== pluginId) {\n throw new Error(\n `record kind \"${key}\" is already indexed by \"${incumbent.pluginId}\"; refused \"${pluginId}\"`,\n )\n }\n registerPluginService(PLUGIN_RECORD_INDEXES, index, { pluginId, key })\n}\n\n/** The index for a kind, with the plugin that keeps it, or `null` when none does here. */\nexport function pluginRecordIndex(\n kind: string,\n): { pluginId: string; index: PluginRecordIndex } | null {\n const key = kind.trim()\n const entry = resolvePluginServices(PLUGIN_RECORD_INDEXES).find((one) => one.key === key)\n return entry ? { pluginId: entry.pluginId, index: entry.impl } : null\n}\n"],"names":["getRegisteringPluginId","definePluginServiceContract","registerPluginService","resolvePluginServices","PLUGIN_RECORD_INDEXES","multiple","registerPluginRecordIndex","kind","index","options","key","trim","Error","pluginId","incumbent","find","entry","pluginRecordIndex","one","impl"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,sBAAsB,QAAQ,qCAAiC;AACxE,SACEC,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,QAChB,uBAAmB;AAkE1B,OAAO,MAAMC,wBAAwBH,4BACnC,qBACA;IAAEI,UAAU;AAAK,GAClB;AAED;;;;CAIC,GACD,OAAO,SAASC,0BACdC,IAAY,EACZC,KAAwB,EACxBC,OAA+B;QAIbT,MAAAA;IAFlB,MAAMU,MAAMH,KAAKI,IAAI;IACrB,IAAI,CAACD,KAAK,MAAM,IAAIE,MAAM;IAC1B,MAAMC,WAAW,EAACb,QAAAA,0BAAAA,oCAAAA,0BAA4BS,2BAAAA,QAASI,QAAQ,YAA7Cb,OAAiD,IAAIW,IAAI;IAC3E,IAAI,CAACE,UAAU;QACb,MAAM,IAAID,MAAM,CAAC,sBAAsB,EAAEF,IAAI,8BAA8B,CAAC;IAC9E;IACA,MAAMI,YAAYX,sBAAsBC,uBAAuBW,IAAI,CACjE,CAACC,QAAUA,MAAMN,GAAG,KAAKA;IAE3B,IAAII,aAAaA,UAAUD,QAAQ,KAAKA,UAAU;QAChD,MAAM,IAAID,MACR,CAAC,aAAa,EAAEF,IAAI,yBAAyB,EAAEI,UAAUD,QAAQ,CAAC,YAAY,EAAEA,SAAS,CAAC,CAAC;IAE/F;IACAX,sBAAsBE,uBAAuBI,OAAO;QAAEK;QAAUH;IAAI;AACtE;AAEA,wFAAwF,GACxF,OAAO,SAASO,kBACdV,IAAY;IAEZ,MAAMG,MAAMH,KAAKI,IAAI;IACrB,MAAMK,QAAQb,sBAAsBC,uBAAuBW,IAAI,CAAC,CAACG,MAAQA,IAAIR,GAAG,KAAKA;IACrF,OAAOM,QAAQ;QAAEH,UAAUG,MAAMH,QAAQ;QAAEL,OAAOQ,MAAMG,IAAI;IAAC,IAAI;AACnE"}
@@ -0,0 +1,58 @@
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
+ /**
18
+ * "A record changed": the one signal every server writer of an org record
19
+ * already gives (AGL-3336).
20
+ *
21
+ * The capture doors, the conversion, the merge, an automation's step, the
22
+ * record system's own routes — each of them, after it writes a record under
23
+ * `orgs/{orgId}/{collection}`, restamps the fields that record's list
24
+ * queries (`restampCrmListFieldsAt`). That restamp is the only place all of
25
+ * them pass, so it is where a plugin that needs to act on the record AFTER
26
+ * any write — re-evaluating the sharing rules that match it, say — is told.
27
+ * A listener registered here is the alternative to editing every writer.
28
+ *
29
+ * ## What a listener may do
30
+ *
31
+ * Read the record and write it again, in its own transaction. It must not
32
+ * call back into the restamp, which is what would loop; the restamp
33
+ * notifies after its own write, once. A listener that throws is logged and
34
+ * the next one still runs: the write it is told about already landed.
35
+ */
36
+ /**
37
+ * A written record, by its path: the listener opens its own reference, so
38
+ * core names no database SDK.
39
+ */
40
+ export interface PluginRecordWrittenEvent {
41
+ /** `orgs/{orgId}/{collection}/{id}`. */
42
+ path: string;
43
+ /** The collection's name under the org. */
44
+ collection: string;
45
+ }
46
+ export type PluginRecordWrittenListener = (event: PluginRecordWrittenEvent) => Promise<void>;
47
+ export declare const PLUGIN_RECORD_WRITTEN: import("./plugin-services").PluginServiceContract<PluginRecordWrittenListener>;
48
+ /**
49
+ * Registers a listener. The owner is the loader's marker when a register fn
50
+ * is running, else `options.pluginId`; registering twice under one key
51
+ * replaces in place.
52
+ */
53
+ export declare function registerPluginRecordWrittenListener(listener: PluginRecordWrittenListener, options?: {
54
+ pluginId?: string;
55
+ key?: string;
56
+ }): void;
57
+ /** Tells every listener. Never throws. */
58
+ export declare function notifyPluginRecordWritten(event: PluginRecordWrittenEvent): Promise<void>;
@@ -0,0 +1,42 @@
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 { definePluginServiceContract, registerPluginService, resolvePluginServices } from "./plugin-services.js";
18
+ export const PLUGIN_RECORD_WRITTEN = definePluginServiceContract('core.record-written', {
19
+ multiple: true
20
+ });
21
+ /**
22
+ * Registers a listener. The owner is the loader's marker when a register fn
23
+ * is running, else `options.pluginId`; registering twice under one key
24
+ * replaces in place.
25
+ */ export function registerPluginRecordWrittenListener(listener, options) {
26
+ registerPluginService(PLUGIN_RECORD_WRITTEN, listener, _extends({}, (options == null ? void 0 : options.pluginId) ? {
27
+ pluginId: options.pluginId
28
+ } : {}, (options == null ? void 0 : options.key) ? {
29
+ key: options.key
30
+ } : {}));
31
+ }
32
+ /** Tells every listener. Never throws. */ export async function notifyPluginRecordWritten(event) {
33
+ for (const entry of resolvePluginServices(PLUGIN_RECORD_WRITTEN)){
34
+ try {
35
+ await entry.impl(event);
36
+ } catch (error) {
37
+ console.error(`[record-written] ${entry.pluginId} failed on ${event.path}`, error);
38
+ }
39
+ }
40
+ }
41
+
42
+ //# sourceMappingURL=plugin-record-written.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-record-written.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 definePluginServiceContract,\n registerPluginService,\n resolvePluginServices,\n} from './plugin-services'\n\n/**\n * \"A record changed\": the one signal every server writer of an org record\n * already gives (AGL-3336).\n *\n * The capture doors, the conversion, the merge, an automation's step, the\n * record system's own routes — each of them, after it writes a record under\n * `orgs/{orgId}/{collection}`, restamps the fields that record's list\n * queries (`restampCrmListFieldsAt`). That restamp is the only place all of\n * them pass, so it is where a plugin that needs to act on the record AFTER\n * any write — re-evaluating the sharing rules that match it, say — is told.\n * A listener registered here is the alternative to editing every writer.\n *\n * ## What a listener may do\n *\n * Read the record and write it again, in its own transaction. It must not\n * call back into the restamp, which is what would loop; the restamp\n * notifies after its own write, once. A listener that throws is logged and\n * the next one still runs: the write it is told about already landed.\n */\n\n/**\n * A written record, by its path: the listener opens its own reference, so\n * core names no database SDK.\n */\nexport interface PluginRecordWrittenEvent {\n /** `orgs/{orgId}/{collection}/{id}`. */\n path: string\n /** The collection's name under the org. */\n collection: string\n}\n\nexport type PluginRecordWrittenListener = (event: PluginRecordWrittenEvent) => Promise<void>\n\nexport const PLUGIN_RECORD_WRITTEN = definePluginServiceContract<PluginRecordWrittenListener>(\n 'core.record-written',\n { multiple: true },\n)\n\n/**\n * Registers a listener. The owner is the loader's marker when a register fn\n * is running, else `options.pluginId`; registering twice under one key\n * replaces in place.\n */\nexport function registerPluginRecordWrittenListener(\n listener: PluginRecordWrittenListener,\n options?: { pluginId?: string; key?: string },\n): void {\n registerPluginService(PLUGIN_RECORD_WRITTEN, listener, {\n ...(options?.pluginId ? { pluginId: options.pluginId } : {}),\n ...(options?.key ? { key: options.key } : {}),\n })\n}\n\n/** Tells every listener. Never throws. */\nexport async function notifyPluginRecordWritten(event: PluginRecordWrittenEvent): Promise<void> {\n for (const entry of resolvePluginServices(PLUGIN_RECORD_WRITTEN)) {\n try {\n await entry.impl(event)\n } catch (error) {\n console.error(\n `[record-written] ${entry.pluginId} failed on ${event.path}`,\n error,\n )\n }\n }\n}\n"],"names":["definePluginServiceContract","registerPluginService","resolvePluginServices","PLUGIN_RECORD_WRITTEN","multiple","registerPluginRecordWrittenListener","listener","options","pluginId","key","notifyPluginRecordWritten","event","entry","impl","error","console","path"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,QAChB,uBAAmB;AAmC1B,OAAO,MAAMC,wBAAwBH,4BACnC,uBACA;IAAEI,UAAU;AAAK,GAClB;AAED;;;;CAIC,GACD,OAAO,SAASC,oCACdC,QAAqC,EACrCC,OAA6C;IAE7CN,sBAAsBE,uBAAuBG,UAAU,aACjDC,CAAAA,2BAAAA,QAASC,QAAQ,IAAG;QAAEA,UAAUD,QAAQC,QAAQ;IAAC,IAAI,CAAC,GACtDD,CAAAA,2BAAAA,QAASE,GAAG,IAAG;QAAEA,KAAKF,QAAQE,GAAG;IAAC,IAAI,CAAC;AAE/C;AAEA,wCAAwC,GACxC,OAAO,eAAeC,0BAA0BC,KAA+B;IAC7E,KAAK,MAAMC,SAASV,sBAAsBC,uBAAwB;QAChE,IAAI;YACF,MAAMS,MAAMC,IAAI,CAACF;QACnB,EAAE,OAAOG,OAAO;YACdC,QAAQD,KAAK,CACX,CAAC,iBAAiB,EAAEF,MAAMJ,QAAQ,CAAC,WAAW,EAAEG,MAAMK,IAAI,EAAE,EAC5DF;QAEJ;IACF;AACF"}
@@ -0,0 +1,213 @@
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
+ /**
18
+ * WHAT A PLUGIN EARNED THE OPERATOR, ON THE STAFF REVENUE REPORT (AGL-3080).
19
+ *
20
+ * The operator's revenue report states what the deployment actually kept in a
21
+ * period. Its own subscription invoices are platform billing and the report
22
+ * folds them itself. A plugin that sells through the platform's account — a
23
+ * storefront's application fee, a marketplace's commission — earns the
24
+ * operator a take the report cannot compute without knowing that plugin's
25
+ * storage and its fee rules, and it has no business restating either.
26
+ *
27
+ * So the division is: the REPORT is the platform's — the period, the two
28
+ * bases, the gap, the sweep ceiling, the read budget for names and the page.
29
+ * What a plugin's sales earned, net of what is not the operator's, and who
30
+ * produced it, are the plugin's. A source answers one period with a
31
+ * {@link RevenueSourceAnswer}: its earned line, its gross-to-net lines, its
32
+ * qualifications, its attribution tables and its own settled figures.
33
+ *
34
+ * ## ⛔ AN UNREAD SOURCE IS NEVER A ZERO
35
+ *
36
+ * A source that answered nothing reads, on a total, exactly like one that
37
+ * earned nothing, and a revenue total quoted short is a figure somebody
38
+ * repeats. So, as the tax return's sources do:
39
+ *
40
+ * - every plugin that earns through the platform declares
41
+ * `"revenueSource": true` in `plugins.config.json`, compiled into
42
+ * {@link PLUGIN_REVENUE_SOURCES}; a declared plugin with no registration, a
43
+ * source that threw and a malformed answer each come back
44
+ * `outcome: 'refused'`, and the page says whose earnings are missing;
45
+ * - a source whose own read could not run answers with `failure` and figures
46
+ * it does NOT claim, and one whose sweep stopped at the ceiling answers
47
+ * `truncated` — the page names both rather than quoting the total.
48
+ *
49
+ * {@link readRevenueSources} never throws and never drops a declared source.
50
+ * The reader is the staff revenue route, which awaits `ensureAll` on the
51
+ * `consoleApi` surface before it asks.
52
+ */
53
+ import { PLUGIN_REVENUE_SOURCES } from './first-party-plugins.generated';
54
+ export { PLUGIN_REVENUE_SOURCES };
55
+ /**
56
+ * Pages a query to exhaustion under the operator's ceiling. The ceiling is the
57
+ * platform's policy about its own request, so a source is handed the sweep
58
+ * rather than choosing one; `truncated` means the ceiling stopped it.
59
+ */
60
+ export type RevenueSweep = <Doc>(query: unknown, orderField: unknown) => Promise<{
61
+ docs: Doc[];
62
+ truncated: boolean;
63
+ }>;
64
+ /** One attributed row: who produced a gain, and the loss beside it. */
65
+ export interface RevenueAttributionRow {
66
+ key: string;
67
+ /** Display name, filled in by a bounded lookup; the id until then. */
68
+ name: string;
69
+ /** Secondary identity — plugin id, publisher, subdomain. */
70
+ detail: string;
71
+ /** Revenue earned, net of its own reversals. */
72
+ gainCents: number;
73
+ /** Money handed back. Already deducted from `gainCents`. */
74
+ lossCents: number;
75
+ count: number;
76
+ }
77
+ /** A capped attribution: shown rows plus the remainder, as figures. */
78
+ export interface RevenueAttribution {
79
+ rows: RevenueAttributionRow[];
80
+ omittedRows: number;
81
+ omittedGainCents: number;
82
+ omittedLossCents: number;
83
+ }
84
+ /** What the report asks every source, once per period. */
85
+ export interface RevenueSourceRequest {
86
+ /** `2026-08` or `2026-Q3`, echoed for the record. */
87
+ period: string;
88
+ /** Half-open UTC bounds of the period. */
89
+ start: Date;
90
+ end: Date;
91
+ /** Rows per attribution table the page shows; the rest is carried as figures. */
92
+ attributionLimit: number;
93
+ sweep: RevenueSweep;
94
+ /**
95
+ * Display names for organizations — which the report has already read, so
96
+ * naming a publisher costs nothing.
97
+ */
98
+ orgNames(orgIds: readonly string[]): Promise<ReadonlyMap<string, string>>;
99
+ /**
100
+ * Names the rows a source will SHOW from a collection's documents, in place:
101
+ * `name` from `nameField`, `detail` from `detailField`, and `(deleted)` for a
102
+ * document that is gone. Called AFTER capping, so the read is bounded by what
103
+ * is displayed rather than by how many sales the period holds.
104
+ */
105
+ nameRows(rows: RevenueAttributionRow[], from: {
106
+ collection: string;
107
+ nameField: string;
108
+ detailField: string;
109
+ }): Promise<void>;
110
+ }
111
+ /** A line of the report's gross-versus-net reconciliation. */
112
+ export interface RevenueSourceLine {
113
+ label: string;
114
+ cents: number;
115
+ /** Subtracted on the way from gross to what the operator kept. */
116
+ deduction: boolean;
117
+ /** Whose money it is — the sentence that says why it is or is not revenue. */
118
+ note: string;
119
+ }
120
+ /** A table of who produced a source's earnings. */
121
+ export interface RevenueAttributionTable extends RevenueAttribution {
122
+ id: string;
123
+ heading: string;
124
+ /** The column naming what a row is: `Listing`, `Storefront`. */
125
+ unit: string;
126
+ /** The column counting what was summed: `Sales`, `Orders`. */
127
+ countLabel: string;
128
+ empty: string;
129
+ /** Draw the rows as ranked bars above the table, saying this when there are none. */
130
+ chartEmpty?: string;
131
+ }
132
+ /** What a source answers for one period. */
133
+ export interface RevenueSourceAnswer {
134
+ /** Stable key, unique on the report. */
135
+ id: string;
136
+ /** How the report names it when its read stopped short: `marketplace`. */
137
+ name: string;
138
+ /** Its line of "where the money came from", net of everything not the operator's. */
139
+ earned: {
140
+ label: string;
141
+ cents: number;
142
+ note: string;
143
+ };
144
+ grossToNet: RevenueSourceLine[];
145
+ /** Qualifications worth stating beside the figures. Only those that apply. */
146
+ notes: Array<{
147
+ label: string;
148
+ tone: 'warning' | 'neutral';
149
+ }>;
150
+ /** Each sums to `earned`. */
151
+ attribution: RevenueAttributionTable[];
152
+ /** A sentence under the source's attribution tables. */
153
+ attributionNote?: string;
154
+ /** The sweep stopped at the ceiling: every figure is a LOWER BOUND. */
155
+ truncated: boolean;
156
+ /**
157
+ * The source's read could not run at all, so its figures are not counted —
158
+ * never a cap, which is a different state with a different remedy.
159
+ */
160
+ failure: {
161
+ title: string;
162
+ detail: string;
163
+ } | null;
164
+ /** The source's own settled figures, carried whole for the audit. */
165
+ summary: unknown;
166
+ }
167
+ /** One source on the report: its answer, or why there is none. */
168
+ export type RevenueSection = ({
169
+ outcome: 'answered';
170
+ pluginId: string;
171
+ } & RevenueSourceAnswer) | {
172
+ outcome: 'refused';
173
+ pluginId: string;
174
+ /** The plugin id: a refused source never said what it calls itself. */
175
+ id: string;
176
+ reason: string;
177
+ };
178
+ export interface RevenueSource {
179
+ /** This plugin's earnings for one period. May throw: the report refuses it. */
180
+ read(request: RevenueSourceRequest): Promise<RevenueSourceAnswer>;
181
+ }
182
+ /** Every source answers; one per plugin. */
183
+ export declare const REVENUE_SOURCES: import("./plugin-services").PluginServiceContract<RevenueSource>;
184
+ /** Installs a plugin's source; registering again replaces it. */
185
+ export declare function registerRevenueSource(source: RevenueSource, options?: {
186
+ pluginId?: string;
187
+ }): void;
188
+ /** The plugins with a registered source, in the order they answer. */
189
+ export declare function listRevenueSources(): string[];
190
+ /**
191
+ * Group, sort and cap — every attribution table's shared half.
192
+ *
193
+ * A row whose key is missing is NOT dropped. It is grouped under an explicit
194
+ * unattributed key, because a sale nobody can attribute still happened and
195
+ * dropping it would make the rows sum below the total — the one property that
196
+ * makes any of these tables worth reading. The cap carries its remainder as
197
+ * FIGURES, so the table stays a complete accounting even when it is not a
198
+ * complete list.
199
+ */
200
+ export declare function groupRevenueAttribution(entries: ReadonlyArray<{
201
+ key: string;
202
+ detail: string;
203
+ gain: number;
204
+ loss: number;
205
+ }>, limit: number, unattributedLabel: string): RevenueAttribution;
206
+ /**
207
+ * Every source's answer for one period — declared sources first, in the
208
+ * compiled order, then any other registered source.
209
+ *
210
+ * NEVER THROWS and never drops a declared source. `declared` is the compiled
211
+ * {@link PLUGIN_REVENUE_SOURCES} unless a spec passes its own.
212
+ */
213
+ export declare function readRevenueSources(request: RevenueSourceRequest, declared?: readonly string[]): Promise<RevenueSection[]>;