@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,40 @@
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 { PLUGIN_HOST_COLLECTIONS_DECLARED } from "./first-party-plugins.generated.js";
17
+ import { hostResourcePlatformCap } from "./plugin-host-resources.js";
18
+ /** Every collection a plugin declares for the site backup, in config order. */ export function listPluginSiteExportCollections() {
19
+ const out = [];
20
+ for (const row of PLUGIN_HOST_COLLECTIONS_DECLARED){
21
+ var _resource_platformCap;
22
+ const { siteExport, resource } = row;
23
+ if (!siteExport || !resource) continue;
24
+ out.push({
25
+ pluginId: row.pluginId,
26
+ collection: row.name,
27
+ limit: siteExport.limit,
28
+ fields: siteExport.fields,
29
+ label: resource.label,
30
+ count: resource.quotaKey ? {
31
+ quotaKey: resource.quotaKey
32
+ } : {
33
+ max: hostResourcePlatformCap((_resource_platformCap = resource.platformCap) != null ? _resource_platformCap : '')
34
+ }
35
+ });
36
+ }
37
+ return out;
38
+ }
39
+
40
+ //# sourceMappingURL=plugin-site-export.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-site-export.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 { PLUGIN_HOST_COLLECTIONS_DECLARED } from './first-party-plugins.generated'\nimport { hostResourcePlatformCap } from './plugin-host-resources'\n\n/**\n * A plugin's host collection in the platform's whole-site backup (AGL-3080).\n *\n * `/api/hosts/export` writes one JSON bundle of everything designable on a\n * site and `/api/hosts/import` restores it (AGL-163). The platform's own\n * documents — screens, layouts, components, authors, content collections,\n * media — are the routes' to carry. A plugin whose site documents belong in\n * a backup declares so beside the collection, in the `hostCollections` block\n * of `plugins.config.json` (a host collection's `siteExport`), and both\n * routes walk the declarations: the export reads up to `limit` live documents\n * into the bundle under the collection's own name, and the restore writes each\n * one back through `fields` and counts the result against the collection's\n * declared `resource`.\n *\n * ## `fields` is the round trip, not the create\n *\n * A restore writes with `merge: false`, so the list is every key a live\n * document carries — which can be narrower than what a create admits, and is\n * often wider — and a key left off is ERASED from every restored document\n * (AGL-1382). Nothing the restore stamps (`createdAt`, `updatedAt`,\n * `deletedAt`) or scopes (`visibleTo`) is on it; the generator refuses them.\n *\n * ## Compiled, and counted\n *\n * A backup that silently lacks a collection is worse than a failed one: the\n * file looks whole until the day it is restored. So the declarations are\n * compiled, present the moment this module is imported, and a runtime\n * `registerPluginHostCollections` carrying a `siteExport` throws. A restore\n * creates documents with the Admin SDK, past the rules, so the generator also\n * refuses a `siteExport` on a collection with no `resource`: the resource's\n * plan counter or flat platform cap is what the restore is met against.\n *\n * Reached by its own subpath, never the barrel: its readers are the two\n * console routes.\n */\nexport interface PluginHostCollectionSiteExport {\n /** The most live documents one bundle carries; a restore writes no more. */\n limit: number\n /** The keys a restore writes back. Anything else a bundle carries is dropped. */\n fields: readonly string[]\n}\n\n/** What a restore of a declared collection is counted against. */\nexport type PluginSiteExportCount =\n /** A plan counter, an `OrgEntitlements` key core resolves. */\n | { quotaKey: string }\n /**\n * A flat platform cap, resolved from the name the resource declares, or\n * `null` for a name core does not hold — which a restore refuses.\n */\n | { max: number | null }\n\n/** A declared collection with the plugin that made it and its count. */\nexport interface ResolvedPluginSiteExportCollection extends PluginHostCollectionSiteExport {\n pluginId: string\n /** The subcollection under `hosts/{hostId}`, and its key in the bundle. */\n collection: string\n /** Plural, for a restore's refusal: \"this backup holds 40 {label}\". */\n label: string\n count: PluginSiteExportCount\n}\n\n/** Every collection a plugin declares for the site backup, in config order. */\nexport function listPluginSiteExportCollections(): ResolvedPluginSiteExportCollection[] {\n const out: ResolvedPluginSiteExportCollection[] = []\n for (const row of PLUGIN_HOST_COLLECTIONS_DECLARED) {\n const { siteExport, resource } = row\n if (!siteExport || !resource) continue\n out.push({\n pluginId: row.pluginId,\n collection: row.name,\n limit: siteExport.limit,\n fields: siteExport.fields,\n label: resource.label,\n count: resource.quotaKey\n ? { quotaKey: resource.quotaKey }\n : { max: hostResourcePlatformCap(resource.platformCap ?? '') },\n })\n }\n return out\n}\n"],"names":["PLUGIN_HOST_COLLECTIONS_DECLARED","hostResourcePlatformCap","listPluginSiteExportCollections","out","row","resource","siteExport","push","pluginId","collection","name","limit","fields","label","count","quotaKey","max","platformCap"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,gCAAgC,QAAQ,qCAAiC;AAClF,SAASC,uBAAuB,QAAQ,6BAAyB;AAgEjE,6EAA6E,GAC7E,OAAO,SAASC;IACd,MAAMC,MAA4C,EAAE;IACpD,KAAK,MAAMC,OAAOJ,iCAAkC;YAWbK;QAVrC,MAAM,EAAEC,UAAU,EAAED,QAAQ,EAAE,GAAGD;QACjC,IAAI,CAACE,cAAc,CAACD,UAAU;QAC9BF,IAAII,IAAI,CAAC;YACPC,UAAUJ,IAAII,QAAQ;YACtBC,YAAYL,IAAIM,IAAI;YACpBC,OAAOL,WAAWK,KAAK;YACvBC,QAAQN,WAAWM,MAAM;YACzBC,OAAOR,SAASQ,KAAK;YACrBC,OAAOT,SAASU,QAAQ,GACpB;gBAAEA,UAAUV,SAASU,QAAQ;YAAC,IAC9B;gBAAEC,KAAKf,yBAAwBI,wBAAAA,SAASY,WAAW,YAApBZ,wBAAwB;YAAI;QACjE;IACF;IACA,OAAOF;AACT"}
@@ -0,0 +1,88 @@
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 child sitemap a plugin's documents fill, declared by that plugin
19
+ * (AGL-3080).
20
+ *
21
+ * The tenant's `/sitemap.xml` is an index over one child per section (AGL-2520):
22
+ * the site's pages, its content collections and its authors are the platform's
23
+ * and are built by the route itself. A plugin that serves pages of its own — a
24
+ * product at `/products/{slug}` — had its section written into that route by
25
+ * hand: the collection, the filter, the store setting that switches it on, the
26
+ * address and the date field were all core's knowledge of one plugin's model.
27
+ *
28
+ * So the plugin declares the section, and the route builds every declared one
29
+ * the same way: counted for the index, paged by document id for the child.
30
+ *
31
+ * ## Compiled, because the reader is a published page's
32
+ *
33
+ * The sitemap is what a search engine is told the site holds. A section
34
+ * registered at runtime would be missing from any process that had not loaded
35
+ * the plugin, and a crawler reads a missing section as pages that no longer
36
+ * exist — the products drop out of the index silently, on a live site. So
37
+ * sections are compiled from `plugins.config.json` by
38
+ * `tools/scripts/generate-plugin-manifests.mjs`, present the moment this
39
+ * module is imported, and there is no registrar.
40
+ *
41
+ * ## What a declaration can say
42
+ *
43
+ * Only what a sitemap needs and a query can express: one equality filter, the
44
+ * setting that must be set for the pages to render at all, the address with
45
+ * `{slug}` in it, a field that drops a row (a soft delete), and the date
46
+ * fields to try in order. A row without a slug addresses nothing and is left
47
+ * out. Anything richer belongs to the plugin's own page, not to its sitemap.
48
+ *
49
+ * Reached by its own subpath, never the barrel.
50
+ */
51
+ export interface PluginSitemapSectionDeclaration {
52
+ /** The section's path segment: `/sitemaps/{section}/{page}.xml`. */
53
+ section: string;
54
+ /** The subcollection under `hosts/{hostId}` whose documents are the pages. */
55
+ collection: string;
56
+ /** The one equality a document must meet to be a page. */
57
+ where?: {
58
+ field: string;
59
+ equals: string | number | boolean;
60
+ };
61
+ /**
62
+ * A `collection/doc` under the host and a field on it that must be set for
63
+ * the section to exist: the template the pages render through. Unset, the
64
+ * section is left out rather than listing addresses that 404.
65
+ */
66
+ enabledBy?: {
67
+ doc: string;
68
+ field: string;
69
+ };
70
+ /** The page's site path, with `{slug}` standing for the document's slug. */
71
+ path: string;
72
+ /** The field holding the slug; `slug` when absent. */
73
+ slugField?: string;
74
+ /** A field whose truthy value leaves the row out, for a soft delete the filter cannot see. */
75
+ skipWhen?: string;
76
+ /** The fields a row's `lastmod` is read from, first present wins. */
77
+ lastmod?: readonly string[];
78
+ }
79
+ /** A declaration with the plugin that made it. */
80
+ export type ResolvedPluginSitemapSection = PluginSitemapSectionDeclaration & {
81
+ pluginId: string;
82
+ };
83
+ /** Every declared section, in config order — the order the index lists them. */
84
+ export declare function listPluginSitemapSections(): readonly ResolvedPluginSitemapSection[];
85
+ /** One declared section by its name, or `null`. */
86
+ export declare function pluginSitemapSection(section: string): ResolvedPluginSitemapSection | null;
87
+ /** The site path of one row, or `null` for a row with no slug. */
88
+ export declare function pluginSitemapSectionPath(declaration: PluginSitemapSectionDeclaration, slug: unknown): string | null;
@@ -0,0 +1,29 @@
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 { PLUGIN_SITEMAP_SECTIONS_DECLARED } from "./first-party-plugins.generated.js";
17
+ /** Every declared section, in config order — the order the index lists them. */ export function listPluginSitemapSections() {
18
+ return PLUGIN_SITEMAP_SECTIONS_DECLARED;
19
+ }
20
+ /** One declared section by its name, or `null`. */ export function pluginSitemapSection(section) {
21
+ var _PLUGIN_SITEMAP_SECTIONS_DECLARED_find;
22
+ return (_PLUGIN_SITEMAP_SECTIONS_DECLARED_find = PLUGIN_SITEMAP_SECTIONS_DECLARED.find((one)=>one.section === section)) != null ? _PLUGIN_SITEMAP_SECTIONS_DECLARED_find : null;
23
+ }
24
+ /** The site path of one row, or `null` for a row with no slug. */ export function pluginSitemapSectionPath(declaration, slug) {
25
+ if (typeof slug !== 'string' || !slug) return null;
26
+ return declaration.path.replace('{slug}', slug);
27
+ }
28
+
29
+ //# sourceMappingURL=plugin-sitemap-sections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-sitemap-sections.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 { PLUGIN_SITEMAP_SECTIONS_DECLARED } from './first-party-plugins.generated'\n\n/**\n * A child sitemap a plugin's documents fill, declared by that plugin\n * (AGL-3080).\n *\n * The tenant's `/sitemap.xml` is an index over one child per section (AGL-2520):\n * the site's pages, its content collections and its authors are the platform's\n * and are built by the route itself. A plugin that serves pages of its own — a\n * product at `/products/{slug}` — had its section written into that route by\n * hand: the collection, the filter, the store setting that switches it on, the\n * address and the date field were all core's knowledge of one plugin's model.\n *\n * So the plugin declares the section, and the route builds every declared one\n * the same way: counted for the index, paged by document id for the child.\n *\n * ## Compiled, because the reader is a published page's\n *\n * The sitemap is what a search engine is told the site holds. A section\n * registered at runtime would be missing from any process that had not loaded\n * the plugin, and a crawler reads a missing section as pages that no longer\n * exist — the products drop out of the index silently, on a live site. So\n * sections are compiled from `plugins.config.json` by\n * `tools/scripts/generate-plugin-manifests.mjs`, present the moment this\n * module is imported, and there is no registrar.\n *\n * ## What a declaration can say\n *\n * Only what a sitemap needs and a query can express: one equality filter, the\n * setting that must be set for the pages to render at all, the address with\n * `{slug}` in it, a field that drops a row (a soft delete), and the date\n * fields to try in order. A row without a slug addresses nothing and is left\n * out. Anything richer belongs to the plugin's own page, not to its sitemap.\n *\n * Reached by its own subpath, never the barrel.\n */\nexport interface PluginSitemapSectionDeclaration {\n /** The section's path segment: `/sitemaps/{section}/{page}.xml`. */\n section: string\n /** The subcollection under `hosts/{hostId}` whose documents are the pages. */\n collection: string\n /** The one equality a document must meet to be a page. */\n where?: { field: string; equals: string | number | boolean }\n /**\n * A `collection/doc` under the host and a field on it that must be set for\n * the section to exist: the template the pages render through. Unset, the\n * section is left out rather than listing addresses that 404.\n */\n enabledBy?: { doc: string; field: string }\n /** The page's site path, with `{slug}` standing for the document's slug. */\n path: string\n /** The field holding the slug; `slug` when absent. */\n slugField?: string\n /** A field whose truthy value leaves the row out, for a soft delete the filter cannot see. */\n skipWhen?: string\n /** The fields a row's `lastmod` is read from, first present wins. */\n lastmod?: readonly string[]\n}\n\n/** A declaration with the plugin that made it. */\nexport type ResolvedPluginSitemapSection = PluginSitemapSectionDeclaration & {\n pluginId: string\n}\n\n/** Every declared section, in config order — the order the index lists them. */\nexport function listPluginSitemapSections(): readonly ResolvedPluginSitemapSection[] {\n return PLUGIN_SITEMAP_SECTIONS_DECLARED\n}\n\n/** One declared section by its name, or `null`. */\nexport function pluginSitemapSection(\n section: string,\n): ResolvedPluginSitemapSection | null {\n return PLUGIN_SITEMAP_SECTIONS_DECLARED.find((one) => one.section === section) ?? null\n}\n\n/** The site path of one row, or `null` for a row with no slug. */\nexport function pluginSitemapSectionPath(\n declaration: PluginSitemapSectionDeclaration,\n slug: unknown,\n): string | null {\n if (typeof slug !== 'string' || !slug) return null\n return declaration.path.replace('{slug}', slug)\n}\n"],"names":["PLUGIN_SITEMAP_SECTIONS_DECLARED","listPluginSitemapSections","pluginSitemapSection","section","find","one","pluginSitemapSectionPath","declaration","slug","path","replace"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,gCAAgC,QAAQ,qCAAiC;AAgElF,8EAA8E,GAC9E,OAAO,SAASC;IACd,OAAOD;AACT;AAEA,iDAAiD,GACjD,OAAO,SAASE,qBACdC,OAAe;QAERH;IAAP,QAAOA,yCAAAA,iCAAiCI,IAAI,CAAC,CAACC,MAAQA,IAAIF,OAAO,KAAKA,oBAA/DH,yCAA2E;AACpF;AAEA,gEAAgE,GAChE,OAAO,SAASM,yBACdC,WAA4C,EAC5CC,IAAa;IAEb,IAAI,OAAOA,SAAS,YAAY,CAACA,MAAM,OAAO;IAC9C,OAAOD,YAAYE,IAAI,CAACC,OAAO,CAAC,UAAUF;AAC5C"}
@@ -24,11 +24,18 @@
24
24
  * Importing the owner's model instead is how two money paths end up with two
25
25
  * rounding rules, and the second is found by an accountant.
26
26
  *
27
- * ## Pure, synchronous, and unauthenticated
27
+ * ## Where the rate is kept, and the arithmetic over it
28
28
  *
29
- * Both questions are arithmetic over values the caller already holds: a rate
30
- * off the settings it read, a charge in cents, a settled payment object.
31
- * Nothing is read and nobody is asked who they are.
29
+ * The merchant's rates are the owner's settings, stored where the owner keeps
30
+ * them, so a caller asks for one — {@link PluginTaxProfile.flatRate}, the
31
+ * contract's one read, by site and by the kind of charge — and never reads
32
+ * the owner's documents itself. A plugin that knew where another plugin kept
33
+ * a merchant's tax settings would charge untaxed, and record it as untaxed,
34
+ * the day those settings moved.
35
+ *
36
+ * The other two questions are pure and synchronous arithmetic over values the
37
+ * caller already holds: the rate it was handed, a charge in cents, a settled
38
+ * payment object. Nobody is asked who they are.
32
39
  *
33
40
  * ## No profile is a refusal, never a zero
34
41
  *
@@ -59,6 +66,15 @@ export interface PluginResolvedFlatTax {
59
66
  pct: number;
60
67
  }
61
68
  export interface PluginTaxProfile {
69
+ /**
70
+ * The merchant's flat rate for one kind of charge on a site, as the owner
71
+ * stores it — to be handed to {@link PluginTaxProfile.flatTax} as read. `charge` names what
72
+ * is being sold in the owner's words for its rates (`service` for an
73
+ * appointment). A site that set none, or a kind the owner keeps no rate
74
+ * for, answers `undefined`, which `flatTax` prices at zero. Server-side:
75
+ * the owner reads its own settings document.
76
+ */
77
+ flatRate(hostId: string, charge: string): Promise<unknown>;
62
78
  /**
63
79
  * Tax, EXCLUSIVE, for a flat merchant rate on one charged amount. `rate` is
64
80
  * the merchant's stored setting, passed as read: the owner decides what a
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-tax-profile.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 * The tenant's tax rule, answered by the one plugin that owns it (AGL-3080).\n *\n * More than one plugin takes money — a storefront sells goods, a calendar\n * sells appointments — and a merchant has ONE tax profile. The plugin that\n * keeps it works out what a flat rate adds to a charge and which regime a\n * settled payment was taxed under; any other plugin that charges asks here.\n * Importing the owner's model instead is how two money paths end up with two\n * rounding rules, and the second is found by an accountant.\n *\n * ## Pure, synchronous, and unauthenticated\n *\n * Both questions are arithmetic over values the caller already holds: a rate\n * off the settings it read, a charge in cents, a settled payment object.\n * Nothing is read and nobody is asked who they are.\n *\n * ## No profile is a refusal, never a zero\n *\n * {@link pluginTaxProfile} THROWS when no plugin registered one. Every other\n * seam here answers `null` for \"nobody home\", and this one must not: a caller\n * that read `null` as \"no tax\" would charge a customer an untaxed total and\n * record it as untaxed, silently, and the merchant would owe the difference.\n * A refused sale is seen the same day.\n *\n * It cannot happen in a working build. Both apps load every plugin's server\n * entry before a plugin handler, a cron or the billing webhook runs\n * (`ensureAll`), so the owner's registration is in place wherever a charge is\n * priced; `tax-profile-is-registered.spec.ts` in each app holds that.\n *\n * ## One owner\n *\n * A workspace has one tax profile, so the contract is a slot: a second\n * plugin's profile is refused naming both and the incumbent keeps serving.\n *\n * Import this module by its own subpath\n * (`@aglyn/aglyn/plugin-manager/plugin-tax-profile`); it is not in the barrel.\n */\n\n/** What a flat rate adds to one charge. All zero and empty when it adds nothing. */\nexport interface PluginResolvedFlatTax {\n taxCents: number\n /** What the line is called on the receipt. */\n label: string\n pct: number\n}\n\nexport interface PluginTaxProfile {\n /**\n * Tax, EXCLUSIVE, for a flat merchant rate on one charged amount. `rate` is\n * the merchant's stored setting, passed as read: the owner decides what a\n * usable rate is, and an absent, zero, negative or out-of-range one answers\n * zero rather than throwing.\n */\n flatTax(\n rate: unknown,\n chargeCents: number,\n fallbackLabel: string,\n ): PluginResolvedFlatTax\n /**\n * Which regime a settled payment was taxed under, as the owner records it.\n * `manualTaxCents` is the tax this caller added as a line of its own, which\n * the payment processor reports as no tax at all.\n */\n taxModeOf(settledPayment: unknown, manualTaxCents?: number): string\n}\n\nexport const PLUGIN_TAX_PROFILE = definePluginServiceContract<PluginTaxProfile>(\n 'core.tax-profile',\n { multiple: false },\n)\n\n/** Registers the plugin that owns the tenant's tax rule. */\nexport function registerPluginTaxProfile(\n profile: PluginTaxProfile,\n options?: { pluginId?: string },\n): void {\n registerPluginService(PLUGIN_TAX_PROFILE, profile, {\n ...(options?.pluginId ? { pluginId: options.pluginId } : {}),\n })\n}\n\n/** The owner, or `null` — for a caller that only wants to know who it is. */\nexport function pluginTaxProfileOwner(): string | null {\n return resolvePluginServices(PLUGIN_TAX_PROFILE)[0]?.pluginId ?? null\n}\n\n/** The tax rule. THROWS when no plugin registered one; see the module note. */\nexport function pluginTaxProfile(): PluginTaxProfile {\n const entry = resolvePluginServices(PLUGIN_TAX_PROFILE)[0]\n if (!entry) {\n throw new Error(\n 'no plugin registered a tax profile, so this charge cannot be priced: ' +\n 'refusing rather than charging it untaxed',\n )\n }\n return entry.impl\n}\n"],"names":["definePluginServiceContract","registerPluginService","resolvePluginServices","PLUGIN_TAX_PROFILE","multiple","registerPluginTaxProfile","profile","options","pluginId","pluginTaxProfileOwner","pluginTaxProfile","entry","Error","impl"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,QAChB,uBAAmB;AAoE1B,OAAO,MAAMC,qBAAqBH,4BAChC,oBACA;IAAEI,UAAU;AAAM,GACnB;AAED,0DAA0D,GAC1D,OAAO,SAASC,yBACdC,OAAyB,EACzBC,OAA+B;IAE/BN,sBAAsBE,oBAAoBG,SAAS,aAC7CC,CAAAA,2BAAAA,QAASC,QAAQ,IAAG;QAAEA,UAAUD,QAAQC,QAAQ;IAAC,IAAI,CAAC;AAE9D;AAEA,2EAA2E,GAC3E,OAAO,SAASC;;QACPP;IAAP,gBAAOA,0BAAAA,sBAAsBC,mBAAmB,CAAC,EAAE,qBAA5CD,wBAA8CM,QAAQ,mBAAI;AACnE;AAEA,6EAA6E,GAC7E,OAAO,SAASE;IACd,MAAMC,QAAQT,sBAAsBC,mBAAmB,CAAC,EAAE;IAC1D,IAAI,CAACQ,OAAO;QACV,MAAM,IAAIC,MACR,0EACE;IAEN;IACA,OAAOD,MAAME,IAAI;AACnB"}
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-tax-profile.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 * The tenant's tax rule, answered by the one plugin that owns it (AGL-3080).\n *\n * More than one plugin takes money — a storefront sells goods, a calendar\n * sells appointments — and a merchant has ONE tax profile. The plugin that\n * keeps it works out what a flat rate adds to a charge and which regime a\n * settled payment was taxed under; any other plugin that charges asks here.\n * Importing the owner's model instead is how two money paths end up with two\n * rounding rules, and the second is found by an accountant.\n *\n * ## Where the rate is kept, and the arithmetic over it\n *\n * The merchant's rates are the owner's settings, stored where the owner keeps\n * them, so a caller asks for one — {@link PluginTaxProfile.flatRate}, the\n * contract's one read, by site and by the kind of charge — and never reads\n * the owner's documents itself. A plugin that knew where another plugin kept\n * a merchant's tax settings would charge untaxed, and record it as untaxed,\n * the day those settings moved.\n *\n * The other two questions are pure and synchronous arithmetic over values the\n * caller already holds: the rate it was handed, a charge in cents, a settled\n * payment object. Nobody is asked who they are.\n *\n * ## No profile is a refusal, never a zero\n *\n * {@link pluginTaxProfile} THROWS when no plugin registered one. Every other\n * seam here answers `null` for \"nobody home\", and this one must not: a caller\n * that read `null` as \"no tax\" would charge a customer an untaxed total and\n * record it as untaxed, silently, and the merchant would owe the difference.\n * A refused sale is seen the same day.\n *\n * It cannot happen in a working build. Both apps load every plugin's server\n * entry before a plugin handler, a cron or the billing webhook runs\n * (`ensureAll`), so the owner's registration is in place wherever a charge is\n * priced; `tax-profile-is-registered.spec.ts` in each app holds that.\n *\n * ## One owner\n *\n * A workspace has one tax profile, so the contract is a slot: a second\n * plugin's profile is refused naming both and the incumbent keeps serving.\n *\n * Import this module by its own subpath\n * (`@aglyn/aglyn/plugin-manager/plugin-tax-profile`); it is not in the barrel.\n */\n\n/** What a flat rate adds to one charge. All zero and empty when it adds nothing. */\nexport interface PluginResolvedFlatTax {\n taxCents: number\n /** What the line is called on the receipt. */\n label: string\n pct: number\n}\n\nexport interface PluginTaxProfile {\n /**\n * The merchant's flat rate for one kind of charge on a site, as the owner\n * stores it — to be handed to {@link PluginTaxProfile.flatTax} as read. `charge` names what\n * is being sold in the owner's words for its rates (`service` for an\n * appointment). A site that set none, or a kind the owner keeps no rate\n * for, answers `undefined`, which `flatTax` prices at zero. Server-side:\n * the owner reads its own settings document.\n */\n flatRate(hostId: string, charge: string): Promise<unknown>\n /**\n * Tax, EXCLUSIVE, for a flat merchant rate on one charged amount. `rate` is\n * the merchant's stored setting, passed as read: the owner decides what a\n * usable rate is, and an absent, zero, negative or out-of-range one answers\n * zero rather than throwing.\n */\n flatTax(\n rate: unknown,\n chargeCents: number,\n fallbackLabel: string,\n ): PluginResolvedFlatTax\n /**\n * Which regime a settled payment was taxed under, as the owner records it.\n * `manualTaxCents` is the tax this caller added as a line of its own, which\n * the payment processor reports as no tax at all.\n */\n taxModeOf(settledPayment: unknown, manualTaxCents?: number): string\n}\n\nexport const PLUGIN_TAX_PROFILE = definePluginServiceContract<PluginTaxProfile>(\n 'core.tax-profile',\n { multiple: false },\n)\n\n/** Registers the plugin that owns the tenant's tax rule. */\nexport function registerPluginTaxProfile(\n profile: PluginTaxProfile,\n options?: { pluginId?: string },\n): void {\n registerPluginService(PLUGIN_TAX_PROFILE, profile, {\n ...(options?.pluginId ? { pluginId: options.pluginId } : {}),\n })\n}\n\n/** The owner, or `null` — for a caller that only wants to know who it is. */\nexport function pluginTaxProfileOwner(): string | null {\n return resolvePluginServices(PLUGIN_TAX_PROFILE)[0]?.pluginId ?? null\n}\n\n/** The tax rule. THROWS when no plugin registered one; see the module note. */\nexport function pluginTaxProfile(): PluginTaxProfile {\n const entry = resolvePluginServices(PLUGIN_TAX_PROFILE)[0]\n if (!entry) {\n throw new Error(\n 'no plugin registered a tax profile, so this charge cannot be priced: ' +\n 'refusing rather than charging it untaxed',\n )\n }\n return entry.impl\n}\n"],"names":["definePluginServiceContract","registerPluginService","resolvePluginServices","PLUGIN_TAX_PROFILE","multiple","registerPluginTaxProfile","profile","options","pluginId","pluginTaxProfileOwner","pluginTaxProfile","entry","Error","impl"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,QAChB,uBAAmB;AAoF1B,OAAO,MAAMC,qBAAqBH,4BAChC,oBACA;IAAEI,UAAU;AAAM,GACnB;AAED,0DAA0D,GAC1D,OAAO,SAASC,yBACdC,OAAyB,EACzBC,OAA+B;IAE/BN,sBAAsBE,oBAAoBG,SAAS,aAC7CC,CAAAA,2BAAAA,QAASC,QAAQ,IAAG;QAAEA,UAAUD,QAAQC,QAAQ;IAAC,IAAI,CAAC;AAE9D;AAEA,2EAA2E,GAC3E,OAAO,SAASC;;QACPP;IAAP,gBAAOA,0BAAAA,sBAAsBC,mBAAmB,CAAC,EAAE,qBAA5CD,wBAA8CM,QAAQ,mBAAI;AACnE;AAEA,6EAA6E,GAC7E,OAAO,SAASE;IACd,MAAMC,QAAQT,sBAAsBC,mBAAmB,CAAC,EAAE;IAC1D,IAAI,CAACQ,OAAO;QACV,MAAM,IAAIC,MACR,0EACE;IAEN;IACA,OAAOD,MAAME,IAAI;AACnB"}
@@ -0,0 +1,255 @@
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
+ * THE SALES A PLUGIN MADE THROUGH THE PLATFORM, ON THE OPERATOR'S RETURN
19
+ * (AGL-3080).
20
+ *
21
+ * The operator — whoever runs this deployment — files a sales tax return for
22
+ * the sales it FACILITATED, not only for its own. Its own subscription
23
+ * invoices are platform billing and the return sums them itself. A plugin
24
+ * that sells through the platform's account — a storefront checkout whose tax
25
+ * Stripe computes against the operator's registrations, a marketplace charge
26
+ * whose tax stays platform-side — holds records the return cannot read
27
+ * without knowing that plugin's storage, and a classification of them the
28
+ * return has no business restating.
29
+ *
30
+ * So the division is: the FILING is the platform's — the period, the
31
+ * jurisdiction and registration, the verdict, the working-papers export and
32
+ * the Texas Webfile lines. What a plugin sold, how each of its rows
33
+ * classifies and who is liable for it, and the words a preparer reads about
34
+ * it, are the plugin's. A source answers one period with a
35
+ * {@link TaxReturnSourceAnswer}: its findings, its lines for the filing
36
+ * figures, its tables and figures for the screen, its blocks for the export,
37
+ * and its own summary and rows carried whole for the audit.
38
+ *
39
+ * ## ⛔ AN UNREAD SOURCE REFUSES, IT NEVER READS AS ZERO
40
+ *
41
+ * Decided before anything else, because this is a legal filing. A source
42
+ * that answered nothing is indistinguishable, on a total, from a source that
43
+ * sold nothing — and a return signed on that total understates what the
44
+ * operator collected and holds. So:
45
+ *
46
+ * - **Declared and not registered** — every plugin whose sales belong on the
47
+ * return says so with `"taxReturnSource": true` in `plugins.config.json`,
48
+ * compiled into {@link PLUGIN_TAX_RETURN_SOURCES}. A declared plugin that
49
+ * registered no source in this process answers `outcome: 'refused'`. A
50
+ * runtime registry alone could not say this: an empty registry looks
51
+ * exactly like a deployment where nothing sells.
52
+ * - **Threw, or answered a malformed section** — `outcome: 'refused'`, with
53
+ * the sentence the return prints.
54
+ * - **Truncated, or holding rows no period can reach** — answered, and the
55
+ * platform raises each as a BLOCKING finding itself; a source cannot word
56
+ * its way out of either.
57
+ *
58
+ * The return turns every refusal into a blocking "do not file from this"
59
+ * finding. {@link readTaxReturnSources} never throws and never drops a
60
+ * declared source.
61
+ *
62
+ * The reader is the staff tax-return route, which awaits `ensureAll` on the
63
+ * `consoleApi` surface before it asks, so a runtime registry is filled before
64
+ * the question; the compiled declaration is what makes a MISSING
65
+ * registration a refusal rather than an absence.
66
+ *
67
+ * ⚑ The discriminant is a string: this repo compiles with
68
+ * `strictNullChecks: false`, under which a boolean-literal union does not
69
+ * narrow (see `plugin-artifact-inventory.ts`).
70
+ */
71
+ import { PLUGIN_TAX_RETURN_SOURCES } from './first-party-plugins.generated';
72
+ export { PLUGIN_TAX_RETURN_SOURCES };
73
+ /** Which exporter the filing jurisdiction gets. */
74
+ export type TaxReturnFilingForm = 'tx-webfile' | 'breakdown';
75
+ /**
76
+ * The jurisdiction the operator files in, as the platform resolved it from
77
+ * its own configuration. A source words its lines and findings for THIS
78
+ * jurisdiction and never assumes one.
79
+ */
80
+ export interface TaxReturnFiling {
81
+ /** The bucket key: `US-TX`, `US-CA`, `GB`. */
82
+ code: string;
83
+ /** How a sentence names it: `Texas`, or the code itself. */
84
+ label: string;
85
+ /** Which exporter the filing lines are for. */
86
+ form: TaxReturnFilingForm;
87
+ /** How a sentence names the filing figures: `Items 1–3`, `the breakdown`. */
88
+ figuresName: string;
89
+ }
90
+ /** What the return asks every source, once per period. */
91
+ export interface TaxReturnSourceRequest {
92
+ /** `2026-Q3` or `2026-09`, echoed for the record. */
93
+ period: string;
94
+ /** Half-open UTC bounds of the period. */
95
+ start: Date;
96
+ end: Date;
97
+ filing: TaxReturnFiling;
98
+ /**
99
+ * The most documents the operator will read for one source. Past it the
100
+ * answer is `truncated`, and a truncated source blocks the return: the
101
+ * ceiling is the operator's policy, so a source is TOLD it.
102
+ */
103
+ rowCap: number;
104
+ }
105
+ export type TaxReturnFindingSeverity = 'blocking' | 'review';
106
+ /**
107
+ * One finding, in the words a preparer reads. `blocking` means the return
108
+ * must not be filed until it is resolved; `review` means a figure is
109
+ * qualified. A zero count is not raised.
110
+ */
111
+ export interface TaxReturnFinding {
112
+ /** Stable, and unique on the return. */
113
+ id: string;
114
+ severity: TaxReturnFindingSeverity;
115
+ /** Rows, or cents where the label says so. */
116
+ count: number;
117
+ label: string;
118
+ /** What it means for the return, and what to do — not a restatement. */
119
+ detail: string;
120
+ }
121
+ /** A line printed beneath the platform's own filing figures. */
122
+ export interface TaxReturnFilingLine {
123
+ /** The form's item number where the figure maps to one, else `—`. */
124
+ item: string;
125
+ label: string;
126
+ /** Dollars, or null when the figure is not computed. */
127
+ dollars: string | null;
128
+ note: string;
129
+ }
130
+ /** One cell of a source's table on the screen. */
131
+ export interface TaxReturnSectionCell {
132
+ text: string;
133
+ /** A second, quieter line under the text. */
134
+ caption?: string;
135
+ /**
136
+ * A short tag beside the text. `attention` marks the figure that needs a
137
+ * decision; `neutral` qualifies one.
138
+ */
139
+ tag?: {
140
+ label: string;
141
+ tone: 'attention' | 'neutral';
142
+ };
143
+ /** The figure a reader must not miss. */
144
+ strong?: boolean;
145
+ }
146
+ export interface TaxReturnSectionColumn {
147
+ label: string;
148
+ /** Right-aligned. */
149
+ numeric?: boolean;
150
+ /** Money: set in a fixed-width face so columns of cents line up. */
151
+ money?: boolean;
152
+ }
153
+ /** A table on the source's card. */
154
+ export interface TaxReturnSectionTable {
155
+ /** A subheading above the table; the first table sits under the card's own. */
156
+ heading?: string;
157
+ /** A sentence between the heading and the table. */
158
+ description?: string;
159
+ columns: TaxReturnSectionColumn[];
160
+ rows: Array<{
161
+ key: string;
162
+ cells: TaxReturnSectionCell[];
163
+ }>;
164
+ /** What the table says when it has no rows. */
165
+ empty: string;
166
+ /** A caption under the table. */
167
+ footnote?: string;
168
+ }
169
+ /** One label/value line of a source's figures. */
170
+ export interface TaxReturnSectionFigure {
171
+ label: string;
172
+ value: string;
173
+ note: string;
174
+ }
175
+ /**
176
+ * One block of the working-papers export, as the CSV's own rows.
177
+ *
178
+ * `jurisdictions` places it beside the operator's own sales by jurisdiction,
179
+ * before the working papers; `sections` places it after them, where each
180
+ * source's figures sit. The platform separates blocks with a blank row.
181
+ */
182
+ export interface TaxReturnExportBlock {
183
+ placement: 'jurisdictions' | 'sections';
184
+ rows: string[][];
185
+ }
186
+ /** What a source answers for one period. */
187
+ export interface TaxReturnSourceAnswer {
188
+ /** Stable key for the source's findings and its card, unique on the return. */
189
+ id: string;
190
+ /** The noun for its rows: `Storefront`, `Marketplace`. */
191
+ name: string;
192
+ /** The card's heading. */
193
+ title: string;
194
+ /** The card's help, as a documentation excerpt. */
195
+ help: string;
196
+ /** The paragraph under the heading. */
197
+ intro: string;
198
+ /** Documents past the request's `rowCap` were not read. */
199
+ truncated: boolean;
200
+ /** Rows no period query can reach — in this return and every other. */
201
+ undatedRows: number;
202
+ /** The source's own findings. Truncation and undated rows are raised by the platform. */
203
+ findings: TaxReturnFinding[];
204
+ /** Lines beneath the filing figures, for the request's `filing.form`. */
205
+ filingLines: TaxReturnFilingLine[];
206
+ tables: TaxReturnSectionTable[];
207
+ figures: TaxReturnSectionFigure[];
208
+ exports: TaxReturnExportBlock[];
209
+ /** The source's own figures, carried whole for the audit. */
210
+ summary: unknown;
211
+ /** The rows behind them, as the source projects them for the working papers. */
212
+ rows: unknown[];
213
+ }
214
+ /** One source on the return: its answer, or why there is none. */
215
+ export type TaxReturnSection = ({
216
+ outcome: 'answered';
217
+ pluginId: string;
218
+ } & TaxReturnSourceAnswer) | {
219
+ outcome: 'refused';
220
+ pluginId: string;
221
+ /** The plugin id: a refused source never said what it calls itself. */
222
+ id: string;
223
+ /** Why nothing from this source is on the return, as the return prints it. */
224
+ reason: string;
225
+ };
226
+ export interface TaxReturnSource {
227
+ /**
228
+ * This plugin's sales for one period. May throw: the return refuses the
229
+ * source rather than read a throw as nothing sold.
230
+ */
231
+ read(request: TaxReturnSourceRequest): Promise<TaxReturnSourceAnswer>;
232
+ }
233
+ /** Every source answers; one per plugin. */
234
+ export declare const TAX_RETURN_SOURCES: import("./plugin-services").PluginServiceContract<TaxReturnSource>;
235
+ /**
236
+ * Installs a plugin's source. Owner = the loader's marker inside a register
237
+ * fn, else `options.pluginId`. Registering again replaces the plugin's
238
+ * earlier source, so a module evaluated twice does not answer twice.
239
+ */
240
+ export declare function registerTaxReturnSource(source: TaxReturnSource, options?: {
241
+ pluginId?: string;
242
+ }): void;
243
+ /** The plugins with a registered source, in the order they answer. */
244
+ export declare function listTaxReturnSources(): string[];
245
+ /**
246
+ * Every source's answer for one period — declared sources first, in the
247
+ * compiled order, then any other registered source in registration order.
248
+ *
249
+ * NEVER THROWS and never drops a declared source: a declared plugin with no
250
+ * registration, a source that threw, and a malformed or duplicate answer
251
+ * each come back as `outcome: 'refused'` with the sentence the return prints.
252
+ * `declared` is the compiled {@link PLUGIN_TAX_RETURN_SOURCES} unless a spec
253
+ * passes its own.
254
+ */
255
+ export declare function readTaxReturnSources(request: TaxReturnSourceRequest, declared?: readonly string[]): Promise<TaxReturnSection[]>;