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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/package.json +15 -11
  2. package/src/lib/app-utils/agent-openapi.js +1 -1
  3. package/src/lib/app-utils/agent-openapi.js.map +1 -1
  4. package/src/lib/app-utils/analytics-events.d.ts +3 -2
  5. package/src/lib/app-utils/analytics-events.js +3 -2
  6. package/src/lib/app-utils/analytics-events.js.map +1 -1
  7. package/src/lib/app-utils/api-plugins.d.ts +30 -0
  8. package/src/lib/app-utils/api-plugins.js +24 -1
  9. package/src/lib/app-utils/api-plugins.js.map +1 -1
  10. package/src/lib/app-utils/author-html.d.ts +1 -1
  11. package/src/lib/app-utils/author-html.js.map +1 -1
  12. package/src/lib/app-utils/bandwidth-cap.d.ts +12 -1
  13. package/src/lib/app-utils/bandwidth-cap.js +17 -1
  14. package/src/lib/app-utils/bandwidth-cap.js.map +1 -1
  15. package/src/lib/app-utils/compose-reusable-components.d.ts +19 -0
  16. package/src/lib/app-utils/compose-reusable-components.js +116 -26
  17. package/src/lib/app-utils/compose-reusable-components.js.map +1 -1
  18. package/src/lib/app-utils/console-routes.d.ts +4 -0
  19. package/src/lib/app-utils/console-routes.js +3 -0
  20. package/src/lib/app-utils/console-routes.js.map +1 -1
  21. package/src/lib/app-utils/contacts.d.ts +71 -0
  22. package/src/lib/app-utils/contacts.js +55 -0
  23. package/src/lib/app-utils/contacts.js.map +1 -1
  24. package/src/lib/app-utils/contexts.d.ts +1 -0
  25. package/src/lib/app-utils/contexts.js +1 -0
  26. package/src/lib/app-utils/contexts.js.map +1 -1
  27. package/src/lib/app-utils/crm-email-templates.js +21 -4
  28. package/src/lib/app-utils/crm-email-templates.js.map +1 -1
  29. package/src/lib/app-utils/crm-kinds.d.ts +2 -0
  30. package/src/lib/app-utils/crm-kinds.js +1 -0
  31. package/src/lib/app-utils/crm-kinds.js.map +1 -1
  32. package/src/lib/app-utils/crm.d.ts +1199 -67
  33. package/src/lib/app-utils/crm.js +1951 -310
  34. package/src/lib/app-utils/crm.js.map +1 -1
  35. package/src/lib/app-utils/csv-import.d.ts +10 -38
  36. package/src/lib/app-utils/csv-import.js +17 -42
  37. package/src/lib/app-utils/csv-import.js.map +1 -1
  38. package/src/lib/app-utils/csv.d.ts +32 -11
  39. package/src/lib/app-utils/csv.js +43 -5
  40. package/src/lib/app-utils/csv.js.map +1 -1
  41. package/src/lib/app-utils/default-site.d.ts +116 -0
  42. package/src/lib/app-utils/default-site.js +1024 -0
  43. package/src/lib/app-utils/default-site.js.map +1 -0
  44. package/src/lib/app-utils/docs-help.generated.d.ts +22 -22
  45. package/src/lib/app-utils/docs-help.generated.js +44 -10
  46. package/src/lib/app-utils/docs-help.generated.js.map +1 -1
  47. package/src/lib/app-utils/docs-index.generated.js +738 -150
  48. package/src/lib/app-utils/docs-index.generated.js.map +1 -1
  49. package/src/lib/app-utils/draft-placeholders.d.ts +76 -0
  50. package/src/lib/app-utils/draft-placeholders.js +115 -0
  51. package/src/lib/app-utils/draft-placeholders.js.map +1 -0
  52. package/src/lib/app-utils/entity-picker-context.d.ts +19 -15
  53. package/src/lib/app-utils/entity-picker-context.js +4 -4
  54. package/src/lib/app-utils/entity-picker-context.js.map +1 -1
  55. package/src/lib/app-utils/expand-repeatables.d.ts +66 -10
  56. package/src/lib/app-utils/expand-repeatables.js +88 -14
  57. package/src/lib/app-utils/expand-repeatables.js.map +1 -1
  58. package/src/lib/app-utils/forms.d.ts +33 -22
  59. package/src/lib/app-utils/forms.js +47 -28
  60. package/src/lib/app-utils/forms.js.map +1 -1
  61. package/src/lib/app-utils/full-use-cost.d.ts +277 -0
  62. package/src/lib/app-utils/full-use-cost.js +421 -0
  63. package/src/lib/app-utils/full-use-cost.js.map +1 -0
  64. package/src/lib/app-utils/health-report.js +11 -0
  65. package/src/lib/app-utils/health-report.js.map +1 -1
  66. package/src/lib/app-utils/llms-txt.d.ts +20 -0
  67. package/src/lib/app-utils/llms-txt.js +7 -1
  68. package/src/lib/app-utils/llms-txt.js.map +1 -1
  69. package/src/lib/app-utils/media-asset-facts.d.ts +16 -1
  70. package/src/lib/app-utils/media-asset-facts.js +40 -13
  71. package/src/lib/app-utils/media-asset-facts.js.map +1 -1
  72. package/src/lib/app-utils/media-bandwidth.d.ts +52 -0
  73. package/src/lib/app-utils/media-bandwidth.js +94 -0
  74. package/src/lib/app-utils/media-bandwidth.js.map +1 -0
  75. package/src/lib/app-utils/media-ref.d.ts +241 -33
  76. package/src/lib/app-utils/media-ref.js +324 -43
  77. package/src/lib/app-utils/media-ref.js.map +1 -1
  78. package/src/lib/app-utils/media-src.d.ts +8 -8
  79. package/src/lib/app-utils/media-src.js +27 -11
  80. package/src/lib/app-utils/media-src.js.map +1 -1
  81. package/src/lib/app-utils/media-takedown-reach.d.ts +4 -1
  82. package/src/lib/app-utils/media-takedown-reach.js +6 -3
  83. package/src/lib/app-utils/media-takedown-reach.js.map +1 -1
  84. package/src/lib/app-utils/notifications.d.ts +1 -1
  85. package/src/lib/app-utils/notifications.js +2 -0
  86. package/src/lib/app-utils/notifications.js.map +1 -1
  87. package/src/lib/app-utils/organizations.d.ts +51 -2
  88. package/src/lib/app-utils/organizations.js +56 -3
  89. package/src/lib/app-utils/organizations.js.map +1 -1
  90. package/src/lib/app-utils/page-record-sources.d.ts +87 -0
  91. package/src/lib/app-utils/page-record-sources.js +53 -0
  92. package/src/lib/app-utils/page-record-sources.js.map +1 -0
  93. package/src/lib/app-utils/paid-media-source.d.ts +3 -7
  94. package/src/lib/app-utils/paid-media-source.js +5 -19
  95. package/src/lib/app-utils/paid-media-source.js.map +1 -1
  96. package/src/lib/app-utils/person-erasure.d.ts +5 -2
  97. package/src/lib/app-utils/person-erasure.js.map +1 -1
  98. package/src/lib/app-utils/picklists.d.ts +187 -0
  99. package/src/lib/app-utils/picklists.js +320 -0
  100. package/src/lib/app-utils/picklists.js.map +1 -0
  101. package/src/lib/app-utils/plan-entitlements.d.ts +220 -50
  102. package/src/lib/app-utils/plan-entitlements.js +309 -115
  103. package/src/lib/app-utils/plan-entitlements.js.map +1 -1
  104. package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
  105. package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
  106. package/src/lib/app-utils/release-flags.d.ts +1 -1
  107. package/src/lib/app-utils/release-flags.js +11 -0
  108. package/src/lib/app-utils/release-flags.js.map +1 -1
  109. package/src/lib/app-utils/rendered-widths.d.ts +121 -0
  110. package/src/lib/app-utils/rendered-widths.js +211 -0
  111. package/src/lib/app-utils/rendered-widths.js.map +1 -0
  112. package/src/lib/app-utils/repeat-sources.d.ts +2 -1
  113. package/src/lib/app-utils/repeat-sources.js.map +1 -1
  114. package/src/lib/app-utils/screen-route.d.ts +154 -36
  115. package/src/lib/app-utils/screen-route.js +185 -40
  116. package/src/lib/app-utils/screen-route.js.map +1 -1
  117. package/src/lib/app-utils/seo-audit.d.ts +11 -1
  118. package/src/lib/app-utils/seo-audit.js +33 -13
  119. package/src/lib/app-utils/seo-audit.js.map +1 -1
  120. package/src/lib/app-utils/seo-keywords.d.ts +11 -0
  121. package/src/lib/app-utils/seo-keywords.js +19 -5
  122. package/src/lib/app-utils/seo-keywords.js.map +1 -1
  123. package/src/lib/app-utils/seo-page-facts.d.ts +47 -4
  124. package/src/lib/app-utils/seo-page-facts.js +136 -31
  125. package/src/lib/app-utils/seo-page-facts.js.map +1 -1
  126. package/src/lib/app-utils/seo-site-scan.d.ts +42 -4
  127. package/src/lib/app-utils/seo-site-scan.js +113 -12
  128. package/src/lib/app-utils/seo-site-scan.js.map +1 -1
  129. package/src/lib/app-utils/server.d.ts +5 -4
  130. package/src/lib/app-utils/server.js +14 -5
  131. package/src/lib/app-utils/server.js.map +1 -1
  132. package/src/lib/app-utils/site-icon-set.d.ts +195 -0
  133. package/src/lib/app-utils/site-icon-set.js +351 -0
  134. package/src/lib/app-utils/site-icon-set.js.map +1 -0
  135. package/src/lib/app-utils/site-interactions.d.ts +101 -4
  136. package/src/lib/app-utils/site-interactions.js +120 -4
  137. package/src/lib/app-utils/site-interactions.js.map +1 -1
  138. package/src/lib/app-utils/starter-template-nodes.d.ts +7 -0
  139. package/src/lib/app-utils/starter-template-nodes.js +3 -0
  140. package/src/lib/app-utils/starter-template-nodes.js.map +1 -1
  141. package/src/lib/app-utils/starter-templates.d.ts +5 -19
  142. package/src/lib/app-utils/starter-templates.js +5 -49
  143. package/src/lib/app-utils/starter-templates.js.map +1 -1
  144. package/src/lib/app-utils/transfer-launcher-context.d.ts +136 -0
  145. package/src/lib/app-utils/transfer-launcher-context.js +23 -0
  146. package/src/lib/app-utils/transfer-launcher-context.js.map +1 -0
  147. package/src/lib/app-utils/transfer-resume-import.d.ts +39 -0
  148. package/src/lib/app-utils/transfer-resume-import.js +128 -0
  149. package/src/lib/app-utils/transfer-resume-import.js.map +1 -0
  150. package/src/lib/app-utils/upgrade-proposal.d.ts +66 -0
  151. package/src/lib/app-utils/upgrade-proposal.js +95 -0
  152. package/src/lib/app-utils/upgrade-proposal.js.map +1 -0
  153. package/src/lib/app-utils/utc-month.d.ts +33 -0
  154. package/src/lib/app-utils/utc-month.js +35 -0
  155. package/src/lib/app-utils/utc-month.js.map +1 -0
  156. package/src/lib/app-utils/visitor-record-ceiling.d.ts +4 -4
  157. package/src/lib/app-utils/visitor-record-ceiling.js +4 -4
  158. package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -1
  159. package/src/lib/app-utils/wire-nodes.d.ts +39 -19
  160. package/src/lib/app-utils/wire-nodes.js +120 -34
  161. package/src/lib/app-utils/wire-nodes.js.map +1 -1
  162. package/src/lib/data-transfer/access.d.ts +74 -0
  163. package/src/lib/data-transfer/access.js +93 -0
  164. package/src/lib/data-transfer/access.js.map +1 -0
  165. package/src/lib/data-transfer/derive.d.ts +246 -0
  166. package/src/lib/data-transfer/derive.js +1007 -0
  167. package/src/lib/data-transfer/derive.js.map +1 -0
  168. package/src/lib/data-transfer/export-file.d.ts +46 -0
  169. package/src/lib/data-transfer/export-file.js +146 -0
  170. package/src/lib/data-transfer/export-file.js.map +1 -0
  171. package/src/lib/data-transfer/field-catalog.d.ts +134 -0
  172. package/src/lib/data-transfer/field-catalog.js +278 -0
  173. package/src/lib/data-transfer/field-catalog.js.map +1 -0
  174. package/src/lib/data-transfer/header-match.d.ts +129 -0
  175. package/src/lib/data-transfer/header-match.js +367 -0
  176. package/src/lib/data-transfer/header-match.js.map +1 -0
  177. package/src/lib/data-transfer/index.d.ts +34 -0
  178. package/src/lib/data-transfer/index.js +40 -0
  179. package/src/lib/data-transfer/index.js.map +1 -0
  180. package/src/lib/data-transfer/job.d.ts +190 -0
  181. package/src/lib/data-transfer/job.js +229 -0
  182. package/src/lib/data-transfer/job.js.map +1 -0
  183. package/src/lib/data-transfer/lookup.d.ts +45 -0
  184. package/src/lib/data-transfer/lookup.js +71 -0
  185. package/src/lib/data-transfer/lookup.js.map +1 -0
  186. package/src/lib/data-transfer/match.d.ts +99 -0
  187. package/src/lib/data-transfer/match.js +244 -0
  188. package/src/lib/data-transfer/match.js.map +1 -0
  189. package/src/lib/data-transfer/package-plan.d.ts +205 -0
  190. package/src/lib/data-transfer/package-plan.js +475 -0
  191. package/src/lib/data-transfer/package-plan.js.map +1 -0
  192. package/src/lib/data-transfer/package.d.ts +181 -0
  193. package/src/lib/data-transfer/package.js +426 -0
  194. package/src/lib/data-transfer/package.js.map +1 -0
  195. package/src/lib/data-transfer/picklist-map.d.ts +139 -0
  196. package/src/lib/data-transfer/picklist-map.js +271 -0
  197. package/src/lib/data-transfer/picklist-map.js.map +1 -0
  198. package/src/lib/data-transfer/plan.d.ts +176 -0
  199. package/src/lib/data-transfer/plan.js +451 -0
  200. package/src/lib/data-transfer/plan.js.map +1 -0
  201. package/src/lib/data-transfer/policy.d.ts +170 -0
  202. package/src/lib/data-transfer/policy.js +378 -0
  203. package/src/lib/data-transfer/policy.js.map +1 -0
  204. package/src/lib/data-transfer/resource.d.ts +211 -0
  205. package/src/lib/data-transfer/resource.js +241 -0
  206. package/src/lib/data-transfer/resource.js.map +1 -0
  207. package/src/lib/data-transfer/review.d.ts +70 -0
  208. package/src/lib/data-transfer/review.js +233 -0
  209. package/src/lib/data-transfer/review.js.map +1 -0
  210. package/src/lib/data-transfer/similarity.d.ts +40 -0
  211. package/src/lib/data-transfer/similarity.js +106 -0
  212. package/src/lib/data-transfer/similarity.js.map +1 -0
  213. package/src/lib/data-transfer/site-package.d.ts +365 -0
  214. package/src/lib/data-transfer/site-package.js +1077 -0
  215. package/src/lib/data-transfer/site-package.js.map +1 -0
  216. package/src/lib/data-transfer/source.d.ts +74 -0
  217. package/src/lib/data-transfer/source.js +293 -0
  218. package/src/lib/data-transfer/source.js.map +1 -0
  219. package/src/lib/data-transfer/transfer-api.d.ts +898 -0
  220. package/src/lib/data-transfer/transfer-api.js +107 -0
  221. package/src/lib/data-transfer/transfer-api.js.map +1 -0
  222. package/src/lib/foundation/definitions/org-billing.types.d.ts +31 -0
  223. package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
  224. package/src/lib/foundation/definitions/organization.types.d.ts +42 -1
  225. package/src/lib/foundation/definitions/organization.types.js.map +1 -1
  226. package/src/lib/foundation/definitions/platform.types.d.ts +6 -4
  227. package/src/lib/foundation/definitions/platform.types.js.map +1 -1
  228. package/src/lib/foundation/index.d.ts +1 -1
  229. package/src/lib/foundation/index.js.map +1 -1
  230. package/src/lib/plugin-manager/feature-plugins.d.ts +91 -2
  231. package/src/lib/plugin-manager/feature-plugins.js +48 -3
  232. package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
  233. package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +50 -0
  234. package/src/lib/plugin-manager/first-party-plugins.generated.js +1129 -28
  235. package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
  236. package/src/lib/plugin-manager/index.d.ts +0 -1
  237. package/src/lib/plugin-manager/index.js +0 -1
  238. package/src/lib/plugin-manager/index.js.map +1 -1
  239. package/src/lib/plugin-manager/interaction-recipes.d.ts +142 -0
  240. package/src/lib/plugin-manager/interaction-recipes.js +104 -0
  241. package/src/lib/plugin-manager/interaction-recipes.js.map +1 -0
  242. package/src/lib/plugin-manager/interaction-step-checks.d.ts +66 -0
  243. package/src/lib/plugin-manager/interaction-step-checks.js +86 -0
  244. package/src/lib/plugin-manager/interaction-step-checks.js.map +1 -0
  245. package/src/lib/plugin-manager/plugin-artifact-types.d.ts +235 -0
  246. package/src/lib/plugin-manager/plugin-artifact-types.js +99 -0
  247. package/src/lib/plugin-manager/plugin-artifact-types.js.map +1 -0
  248. package/src/lib/plugin-manager/plugin-contact-capture.d.ts +8 -0
  249. package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -1
  250. package/src/lib/plugin-manager/plugin-conversion-credit.d.ts +216 -0
  251. package/src/lib/plugin-manager/plugin-conversion-credit.js +91 -0
  252. package/src/lib/plugin-manager/plugin-conversion-credit.js.map +1 -0
  253. package/src/lib/plugin-manager/plugin-entity-pickers.d.ts +83 -0
  254. package/src/lib/plugin-manager/plugin-entity-pickers.js +87 -0
  255. package/src/lib/plugin-manager/plugin-entity-pickers.js.map +1 -0
  256. package/src/lib/plugin-manager/plugin-host-resources.d.ts +6 -0
  257. package/src/lib/plugin-manager/plugin-host-resources.js +6 -1
  258. package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -1
  259. package/src/lib/plugin-manager/plugin-intake-gates.d.ts +75 -0
  260. package/src/lib/plugin-manager/plugin-intake-gates.js +49 -0
  261. package/src/lib/plugin-manager/plugin-intake-gates.js.map +1 -0
  262. package/src/lib/plugin-manager/plugin-jobs.d.ts +5 -5
  263. package/src/lib/plugin-manager/plugin-jobs.js +7 -7
  264. package/src/lib/plugin-manager/plugin-jobs.js.map +1 -1
  265. package/src/lib/plugin-manager/plugin-live-paths.d.ts +70 -0
  266. package/src/lib/plugin-manager/plugin-live-paths.js +66 -0
  267. package/src/lib/plugin-manager/plugin-live-paths.js.map +1 -0
  268. package/src/lib/plugin-manager/plugin-org-erasure.d.ts +3 -2
  269. package/src/lib/plugin-manager/plugin-org-erasure.js +30 -5
  270. package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
  271. package/src/lib/plugin-manager/plugin-person-erasure.d.ts +68 -9
  272. package/src/lib/plugin-manager/plugin-person-erasure.js +196 -51
  273. package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -1
  274. package/src/lib/plugin-manager/plugin-person-records.d.ts +275 -0
  275. package/src/lib/plugin-manager/plugin-person-records.js +107 -0
  276. package/src/lib/plugin-manager/plugin-person-records.js.map +1 -0
  277. package/src/lib/plugin-manager/plugin-record-counts.d.ts +76 -0
  278. package/src/lib/plugin-manager/plugin-record-counts.js +49 -0
  279. package/src/lib/plugin-manager/plugin-record-counts.js.map +1 -0
  280. package/src/lib/plugin-manager/plugin-record-email-state.d.ts +26 -0
  281. package/src/lib/plugin-manager/plugin-record-email-state.js +16 -0
  282. package/src/lib/plugin-manager/plugin-record-email-state.js.map +1 -1
  283. package/src/lib/plugin-manager/plugin-record-index.d.ts +10 -0
  284. package/src/lib/plugin-manager/plugin-record-index.js.map +1 -1
  285. package/src/lib/plugin-manager/plugin-record-lists.d.ts +86 -6
  286. package/src/lib/plugin-manager/plugin-record-lists.js +42 -5
  287. package/src/lib/plugin-manager/plugin-record-lists.js.map +1 -1
  288. package/src/lib/plugin-manager/plugin-record-origin.d.ts +79 -0
  289. package/src/lib/plugin-manager/plugin-record-origin.js +46 -0
  290. package/src/lib/plugin-manager/plugin-record-origin.js.map +1 -0
  291. package/src/lib/plugin-manager/plugin-record-pages.d.ts +37 -0
  292. package/src/lib/plugin-manager/plugin-record-pages.js +52 -0
  293. package/src/lib/plugin-manager/plugin-record-pages.js.map +1 -0
  294. package/src/lib/plugin-manager/plugin-record-timeline.d.ts +60 -0
  295. package/src/lib/plugin-manager/plugin-record-timeline.js +16 -0
  296. package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -1
  297. package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +5 -5
  298. package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -1
  299. package/src/lib/plugin-manager/plugin-revocations.d.ts +64 -0
  300. package/src/lib/plugin-manager/plugin-revocations.js +47 -0
  301. package/src/lib/plugin-manager/plugin-revocations.js.map +1 -0
  302. package/src/lib/plugin-manager/plugin-send-tallies.d.ts +69 -0
  303. package/src/lib/plugin-manager/plugin-send-tallies.js +45 -0
  304. package/src/lib/plugin-manager/plugin-send-tallies.js.map +1 -0
  305. package/src/lib/plugin-manager/plugin-site-bundle.d.ts +40 -0
  306. package/src/lib/plugin-manager/plugin-site-bundle.js +4 -0
  307. package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -1
  308. package/src/lib/plugin-manager/plugin-site-export.d.ts +57 -1
  309. package/src/lib/plugin-manager/plugin-site-export.js +23 -10
  310. package/src/lib/plugin-manager/plugin-site-export.js.map +1 -1
  311. package/src/lib/plugin-manager/plugin-sitemap-readers.d.ts +146 -0
  312. package/src/lib/plugin-manager/plugin-sitemap-readers.js +110 -0
  313. package/src/lib/plugin-manager/plugin-sitemap-readers.js.map +1 -0
  314. package/src/lib/plugin-manager/plugin-transfer-resources.d.ts +714 -0
  315. package/src/lib/plugin-manager/plugin-transfer-resources.js +443 -0
  316. package/src/lib/plugin-manager/plugin-transfer-resources.js.map +1 -0
  317. package/src/lib/plugin-manager/plugin-usage-axes.d.ts +54 -5
  318. package/src/lib/plugin-manager/plugin-usage-axes.js +11 -3
  319. package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -1
  320. package/src/lib/plugin-manager/plugin-user-erasure.js +9 -1
  321. package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -1
  322. package/src/lib/plugin-manager/plugin-visitor-doors.d.ts +104 -0
  323. package/src/lib/plugin-manager/plugin-visitor-doors.js +108 -0
  324. package/src/lib/plugin-manager/plugin-visitor-doors.js.map +1 -0
  325. package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
  326. package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
  327. package/src/lib/plugin-manager/repeat-rows.d.ts +5 -6
  328. package/src/lib/plugin-manager/repeat-rows.js.map +1 -1
  329. package/src/lib/app-utils/actions.d.ts +0 -310
  330. package/src/lib/app-utils/actions.js +0 -506
  331. package/src/lib/app-utils/actions.js.map +0 -1
  332. package/src/lib/app-utils/automation-placeholders.d.ts +0 -72
  333. package/src/lib/app-utils/automation-placeholders.js +0 -207
  334. package/src/lib/app-utils/automation-placeholders.js.map +0 -1
  335. package/src/lib/app-utils/dataset-models.d.ts +0 -339
  336. package/src/lib/app-utils/dataset-models.js +0 -722
  337. package/src/lib/app-utils/dataset-models.js.map +0 -1
  338. package/src/lib/app-utils/datasets.d.ts +0 -171
  339. package/src/lib/app-utils/datasets.js +0 -227
  340. package/src/lib/app-utils/datasets.js.map +0 -1
  341. package/src/lib/app-utils/form-abuse-ceiling.d.ts +0 -146
  342. package/src/lib/app-utils/form-abuse-ceiling.js +0 -158
  343. package/src/lib/app-utils/form-abuse-ceiling.js.map +0 -1
  344. package/src/lib/plugin-manager/order-fulfilment.d.ts +0 -142
  345. package/src/lib/plugin-manager/order-fulfilment.js +0 -104
  346. package/src/lib/plugin-manager/order-fulfilment.js.map +0 -1
@@ -0,0 +1,714 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { ComponentType } from 'react';
18
+ import type { PicklistSpec, PicklistValue, PicklistValueSet } from '../app-utils/picklists';
19
+ import { type TransferCatalogInput, type TransferFieldCatalog, type TransferResourcePreset } from '../data-transfer/field-catalog';
20
+ import { type TransferAccessIntent } from '../data-transfer/access';
21
+ import type { TransferAliasDictionary } from '../data-transfer/header-match';
22
+ import { type MatchKeySpec, type MatchLookup, type MatchLookupRequest, type RowMatchOutcome } from '../data-transfer/match';
23
+ import type { TransferLookupSuggestion } from '../data-transfer/lookup';
24
+ import type { ExistingPackageItem, PackageDependency, PackageItemDecision, PackageManifestItem } from '../data-transfer/package';
25
+ import type { TransferReferenceKind } from '../data-transfer/package-plan';
26
+ import { type BuildTransferPlanInput, type PlannedTransferRow, type TransferPlan } from '../data-transfer/plan';
27
+ import { type TransferLockedRule, type TransferPolicyDefaults, type TransferValuesComparator } from '../data-transfer/policy';
28
+ import type { TransferChunk, TransferRowResult, TransferUndoEntry, TransferUndoSnapshot, TransferUndoStep } from '../data-transfer/job';
29
+ import { type TransferField, type TransferResourceDescriptor } from '../data-transfer/resource';
30
+ import { type TransferPlanRequiredResponse } from '../data-transfer/transfer-api';
31
+ import type { MdiIconProps } from '../types/nodes';
32
+ /**
33
+ * WHAT A PLUGIN CAN IMPORT AND EXPORT (AGL-3523), the extension point every
34
+ * import wizard, export dialog and transfer job reads.
35
+ *
36
+ * The core in `data-transfer/` knows how a column is matched to a field, how
37
+ * a cell is read, how a row finds its record and what a policy does to it —
38
+ * for no resource in particular. This module is where a resource joins it.
39
+ * The plugin that owns the records declares the resource and answers for it;
40
+ * the job engine and the UI kit ask here and never name a plugin.
41
+ *
42
+ * ## Declared, then registered — and an absent resource is refused
43
+ *
44
+ * The plugin declares the resource in `plugins.config.json`
45
+ * (`transferResources`: a `TransferResourceDescriptor` — key, label, scope,
46
+ * kinds, formats, limits), which the generator compiles. It registers two
47
+ * halves:
48
+ *
49
+ * - the SERVER half, {@link registerPluginTransferResource}, from its
50
+ * `serverDeclarations` or `consoleServerDeclarations` entry: the field
51
+ * catalog, the match keys, the reads, the planned writes and their undo;
52
+ * - the CLIENT half, {@link registerPluginTransferResourceUi}, from its
53
+ * console registrar: how the hub and the wizard show it, and any wizard
54
+ * steps of its own. The registrar loads at
55
+ * {@link TRANSFER_RESOURCES_LOAD_POINT}, which the plugin declares among its
56
+ * `console.slots`.
57
+ *
58
+ * A resource declared with `instances` (one dataset's records, not every
59
+ * dataset's) is reached by a key naming the instance, `<key>:<instance>`:
60
+ * {@link resolveTransferResource} answers the declaration under that whole
61
+ * key, so the job, the person's remembered choices and the one running
62
+ * import are each kept per instance, and the hooks read which instance from
63
+ * `ctx.resource` (`transferResourceInstanceOf`).
64
+ *
65
+ * A resource on the hub that fails at Apply is worse than one that is not on
66
+ * the hub at all, so a declared resource with no server half is never read
67
+ * as "nothing to move": {@link resolveTransferResource} runs the app's
68
+ * declarations step once and throws if it is still missing.
69
+ *
70
+ * ## The plugin writes through its own paths
71
+ *
72
+ * `apply` and `revert` are the plugin's, not a generic writer's: plan bands,
73
+ * consent rules, derived fields and activity entries live on the plugin's
74
+ * write paths, and a transfer that went around them would be a way past
75
+ * every one. The engine owns the job — chunks, the ledger, the time budget —
76
+ * and hands the plugin a {@link TransferApplyWriter} that records each row
77
+ * the moment its write lands, so a retried chunk never writes a row twice.
78
+ *
79
+ * Reached by its own subpath, never the barrel: its readers are the transfer
80
+ * routes, the UI kit, and the plugins that answer them.
81
+ */
82
+ /** A declaration with the plugin that made it, as the generator compiles it. */
83
+ export type ResolvedTransferResourceDeclaration = TransferResourceDescriptor & {
84
+ pluginId: string;
85
+ };
86
+ /**
87
+ * The load point a plugin with a transfer resource declares in its
88
+ * `console.slots`, so the hub and the wizard load its console registrar and
89
+ * with it the client half.
90
+ */
91
+ export declare const TRANSFER_RESOURCES_LOAD_POINT = "transferResources";
92
+ /** Every declared resource, in config order — the order the hub lists them. */
93
+ export declare function listDeclaredTransferResources(): readonly ResolvedTransferResourceDeclaration[];
94
+ /** The declared resource with this key, or `null`. */
95
+ export declare function declaredTransferResource(key: string): ResolvedTransferResourceDeclaration | null;
96
+ /** Whose resources are being listed: a workspace, or one of its sites. */
97
+ export type TransferResourceSubject = ({
98
+ scope: 'org';
99
+ org: {
100
+ enabledPlugins?: string[];
101
+ } | null | undefined;
102
+ } | {
103
+ scope: 'host';
104
+ org: {
105
+ enabledPlugins?: string[];
106
+ } | null | undefined;
107
+ host: {
108
+ disabledPlugins?: string[];
109
+ enabledPlugins?: string[];
110
+ } | null | undefined;
111
+ }) & {
112
+ /**
113
+ * The release-flag verdict for the subject, when the caller has one: a
114
+ * plugin whose flag is off for them offers nothing to move.
115
+ */
116
+ isFlagOn?: (flagKey: string) => boolean;
117
+ /** Staff preview keeps a dark plugin's resources listed. */
118
+ staffBypass?: boolean;
119
+ };
120
+ /**
121
+ * The declared resources of `subject.scope` whose plugin runs for the
122
+ * subject — the workspace's enabled set for `org`, the site's for `host` —
123
+ * in config order. A resource of a plugin switched off is not offered, the
124
+ * same rule every other surface of that plugin follows.
125
+ */
126
+ export declare function listTransferResourcesFor(subject: TransferResourceSubject): ResolvedTransferResourceDeclaration[];
127
+ /** Who is moving what, handed to every server hook. */
128
+ export interface TransferResourceContext {
129
+ /** The resource key. */
130
+ resource: string;
131
+ orgId: string;
132
+ /** The site, for a `host` resource; `null` for an `org` one. */
133
+ hostId: string | null;
134
+ /** The member moving the data, for the plugin's own checks and audit lines. */
135
+ actorUid: string | null;
136
+ /** The job, once one exists; absent for a catalog read or an export page. */
137
+ jobId?: string;
138
+ /**
139
+ * The answers of the plugin's own wizard steps, by step id: during the
140
+ * dry run those sent with it, afterwards those the plan was made with.
141
+ * What the person said in the browser — a hook checks every value it
142
+ * reads and enforces what it means; it never trusts one to name who said it.
143
+ */
144
+ extras?: Readonly<Record<string, unknown>>;
145
+ /** The uploaded file's column names, once a job holds one. */
146
+ headers?: readonly string[];
147
+ /**
148
+ * For a catalog read (`fields`) only: the list filter the export dialog was
149
+ * opened on, in the plugin's own terms. A resource whose columns depend on
150
+ * which records are read — one form's questions — answers for these;
151
+ * every other read ignores it.
152
+ */
153
+ filter?: Readonly<Record<string, unknown>>;
154
+ }
155
+ /** Which records an export page reads. */
156
+ export interface TransferReadOptions {
157
+ /** The most rows one page answers; the plugin may answer fewer. */
158
+ pageSize?: number;
159
+ /** Only these records ("the selection"). */
160
+ ids?: readonly string[];
161
+ /** The list's own filter, in the plugin's own terms ("the current filter"). */
162
+ filter?: Readonly<Record<string, unknown>>;
163
+ /**
164
+ * A collaborator scoped to some sites: read only records whose `visibleTo`
165
+ * holds one of these tokens (`memberScopeTokens`). Absent for a reader who
166
+ * sees the whole workspace. The export route reads through the Admin SDK,
167
+ * so this IS the enforcement.
168
+ */
169
+ scopeTokens?: readonly string[];
170
+ }
171
+ /** One page of an export: rows keyed by field id, and where the next page starts. */
172
+ export interface TransferReadPage {
173
+ rows: Array<Record<string, unknown>>;
174
+ /** `null` when this was the last page. */
175
+ next: string | null;
176
+ }
177
+ /** One picklist as the organization holds it: the platform's spec and the effective values. */
178
+ export interface TransferPicklistList {
179
+ spec: PicklistSpec;
180
+ set: PicklistValueSet;
181
+ }
182
+ /** What a lookup found: the match map, and each found record's current values. */
183
+ export interface TransferLookupResult {
184
+ lookup: MatchLookup;
185
+ /** Record id → its current values by field id, for the plan's before → after. */
186
+ records: ReadonlyMap<string, Readonly<Record<string, unknown>>>;
187
+ }
188
+ /** What a lookup column's unresolved values are matched against for suggestions. */
189
+ export interface TransferLookupSuggestRequest {
190
+ /** The target's field ids the column names records by (`TransferLookupTarget.by`). */
191
+ by: readonly string[];
192
+ /** The values that named no record, as the file spelled them. */
193
+ values: readonly string[];
194
+ }
195
+ /**
196
+ * How a lookup column's values are resolved to records (AGL-3541): the
197
+ * target resource's own hooks, or the {@link TransferRecordsHooks.lookupTargets}
198
+ * entry of a resource that answers a target no resource moves.
199
+ */
200
+ export interface TransferLookupTargetHooks {
201
+ /**
202
+ * The target's keys, for the normalizer a `by` field compares with; a
203
+ * `by` field no key names compares caseless.
204
+ */
205
+ matchKeys?: readonly MatchKeySpec[];
206
+ /** The records holding each requested value — the target's `lookup`, asked by id and by each `by` field. */
207
+ lookup(ctx: TransferResourceContext, requests: readonly MatchLookupRequest[]): Promise<TransferLookupResult>;
208
+ /**
209
+ * Records named LIKE each value, for the person to pick from, by value as
210
+ * given; best first. The engine shows at most five. Without it, a value
211
+ * that named several records still offers those.
212
+ */
213
+ suggest?(ctx: TransferResourceContext, request: TransferLookupSuggestRequest): Promise<Readonly<Record<string, readonly TransferLookupSuggestion[]>>>;
214
+ }
215
+ /**
216
+ * A rule a row must keep that a field policy cannot say — a value that only
217
+ * moves one way, two fields that must agree. Checked against each planned
218
+ * row before the dry run is shown, so a row that breaks it is reported, not
219
+ * discovered at Apply.
220
+ */
221
+ export interface TransferInvariant {
222
+ id: string;
223
+ /** What the rule is, in a sentence the person reads. */
224
+ label: string;
225
+ /** Why this row breaks the rule, or `null` when it keeps it. */
226
+ check(row: PlannedTransferRow, before: Readonly<Record<string, unknown>> | null): string | null;
227
+ }
228
+ /**
229
+ * The engine's ledger, handed to `apply` and `writeItems`. Rows are numbered
230
+ * the way the plan numbers them; a package's items by their manifest index.
231
+ */
232
+ export interface TransferApplyWriter {
233
+ /** The result an earlier attempt recorded for this row, or `null` — a row with one is not written again. */
234
+ alreadyApplied(row: number): Promise<TransferRowResult | null>;
235
+ /** Records a row's result and its undo entry the moment its write lands. */
236
+ markApplied(result: TransferRowResult, undo?: TransferUndoEntry): Promise<void>;
237
+ /** Milliseconds left in the chunk's budget; stop at a row boundary when it runs short. */
238
+ timeLeftMs(): number;
239
+ }
240
+ /** What one chunk's writes came to. */
241
+ export interface TransferApplyResult {
242
+ /** One per row handled, the rows already applied included. */
243
+ results: TransferRowResult[];
244
+ /** What undo needs, for every row written. */
245
+ undo: TransferUndoEntry[];
246
+ }
247
+ /** The person's answer for each undo conflict, by record id. */
248
+ export type TransferRevertDecisions = Readonly<Record<string, 'revert' | 'keep'>>;
249
+ /** What a revert did, and what it left for the person. */
250
+ export interface TransferRevertResult {
251
+ /** The steps carried out. */
252
+ done: TransferUndoStep[];
253
+ /** The records edited since the import, waiting on a decision. */
254
+ conflicts: TransferUndoStep[];
255
+ }
256
+ /**
257
+ * The match keys one context offers — a dataset's own fields, say — and the
258
+ * ones a person starts with (every key, in order, when absent).
259
+ */
260
+ export interface TransferMatchKeyOffer {
261
+ keys: readonly MatchKeySpec[];
262
+ defaults?: readonly string[];
263
+ }
264
+ /** What a resource's own matching is handed: the rows, and what the core made of them. */
265
+ export interface TransferMatchInput {
266
+ /** Each row's values by field id, in file order. */
267
+ rows: ReadonlyArray<Readonly<Record<string, unknown>>>;
268
+ /** The keys the person chose, in priority order. */
269
+ keys: readonly MatchKeySpec[];
270
+ /** What the resource's `lookup` answered for those keys. */
271
+ lookup: MatchLookup;
272
+ /** The records `lookup` read, by id. */
273
+ records: ReadonlyMap<string, Readonly<Record<string, unknown>>>;
274
+ /** The core's outcome for each row (`matchRows`), to keep or replace. */
275
+ outcomes: readonly RowMatchOutcome[];
276
+ }
277
+ /** A resource's own match outcomes, and any record they name that `lookup` did not read. */
278
+ export interface TransferMatchAnswer {
279
+ /** One per row, in file order. */
280
+ outcomes: RowMatchOutcome[];
281
+ /** Records the outcomes name beyond `input.records`, by id — for the review's before and the plan's. */
282
+ records?: ReadonlyMap<string, Readonly<Record<string, unknown>>>;
283
+ }
284
+ /** The hooks a `records` resource answers with. */
285
+ export interface TransferRecordsHooks {
286
+ /** The field catalog: standard, custom, derived and system fields, and their groups. */
287
+ fields(ctx: TransferResourceContext): Promise<TransferCatalogInput> | TransferCatalogInput;
288
+ /**
289
+ * The keys a row finds its record by, in priority order — fixed, or read
290
+ * for the context when they depend on it (an instance's own fields), with
291
+ * the ones a person starts with. Read through {@link transferResourceMatchKeys}.
292
+ */
293
+ matchKeys: readonly MatchKeySpec[] | ((ctx: TransferResourceContext) => Promise<TransferMatchKeyOffer> | TransferMatchKeyOffer);
294
+ /** Other products' header spellings for these fields. */
295
+ aliases?: readonly TransferAliasDictionary[];
296
+ /**
297
+ * Presets of the resource's own, listed after the built-in ones — another
298
+ * product's layout, with that product's column names (`headers`).
299
+ */
300
+ presets?: readonly TransferResourcePreset[];
301
+ /**
302
+ * How many records an export with these options reads, before its first
303
+ * page, so the file carries its row count and the download can be checked
304
+ * whole. Without it the route counts by reading ahead, and a file larger
305
+ * than that is sent without a count.
306
+ */
307
+ count?(ctx: TransferResourceContext, options: TransferReadOptions): Promise<number>;
308
+ /** One page of an export, holding only `fieldIds`. `cursor` is `null` for the first page. */
309
+ readPage(ctx: TransferResourceContext, cursor: string | null, fieldIds: readonly string[], options?: TransferReadOptions): Promise<TransferReadPage>;
310
+ /**
311
+ * The records holding each requested key value. Undo also asks it for
312
+ * records by id — `TRANSFER_ID_FIELD` with the `aglynId` normalizer — to
313
+ * read what each record holds now, so it answers that key whether or not
314
+ * `matchKeys` names it.
315
+ */
316
+ lookup(ctx: TransferResourceContext, requests: readonly MatchLookupRequest[]): Promise<TransferLookupResult>;
317
+ /** Records named like a lookup column's unresolved values; see {@link TransferLookupTargetHooks.suggest}. */
318
+ suggest?: TransferLookupTargetHooks['suggest'];
319
+ /**
320
+ * Lookup targets this resource answers itself, by the key its fields name
321
+ * in `TransferLookupTarget.resource` — records no transfer resource moves,
322
+ * like the workspace's members an owner column names. A target not listed
323
+ * here is a declared resource, resolved through its own hooks.
324
+ */
325
+ lookupTargets?: Readonly<Record<string, TransferLookupTargetHooks>>;
326
+ /**
327
+ * The organization's effective list for each picklist the catalog names
328
+ * (`TransferField.picklistId`), by picklist id. Without it a picklist
329
+ * column is imported as typed, and the values step has nothing to match.
330
+ */
331
+ picklists?(ctx: TransferResourceContext, picklistIds: readonly string[]): Promise<Readonly<Record<string, TransferPicklistList>>>;
332
+ /**
333
+ * Adds the values the person chose to add to a picklist, before the
334
+ * import's first write. Called again with the same values if that write
335
+ * is retried, so an id the list already holds is left as it is.
336
+ */
337
+ addPicklistValues?(ctx: TransferResourceContext, picklistId: string, values: readonly PicklistValue[]): Promise<void>;
338
+ /**
339
+ * Where the person starts on the Conflicts step (AGL-3548) — fixed, or read
340
+ * for the context. Without it the core's: update what matches, create what
341
+ * does not, ask about the rest; fill blanks and leave on blank. A resource
342
+ * whose file is the definition of its records (a redirect's destination)
343
+ * starts from overwrite. The person can change every part; the dry run
344
+ * fills what a request leaves out from here.
345
+ */
346
+ defaultPolicy?: TransferPolicyDefaults | ((ctx: TransferResourceContext) => Promise<TransferPolicyDefaults> | TransferPolicyDefaults);
347
+ /**
348
+ * Which record each row is about, when the core's key-by-key matching is
349
+ * not how the resource tells its records apart (AGL-3548) — a redirect is
350
+ * one rule per mode at a from-path, so `/blog` names the exact rule or the
351
+ * prefix rule by the row's mode. The engine runs it after `matchRows` for
352
+ * the Matching step, the Conflicts step and the dry run alike, so all
353
+ * three show the outcome the write will act on; `plan` receives these
354
+ * outcomes as `input.matches`.
355
+ */
356
+ match?(ctx: TransferResourceContext, input: TransferMatchInput): Promise<TransferMatchAnswer> | TransferMatchAnswer;
357
+ /**
358
+ * Whether two values of a field are the same value as the resource stores
359
+ * it (AGL-3548) — a status kept in lower case, a path kept normalized —
360
+ * or `undefined` to leave it to the core. Used by the Conflicts step and
361
+ * the dry run, so a value the write would fold is no conflict and no change.
362
+ */
363
+ valuesEqual?: TransferValuesComparator;
364
+ /** The plan, when the core's `buildTransferPlan` is not enough. */
365
+ plan?(ctx: TransferResourceContext, input: BuildTransferPlanInput): Promise<TransferPlan> | TransferPlan;
366
+ /** The plugin's locked rules, shown locked in the wizard with their reasons. */
367
+ lockedRules?(ctx: TransferResourceContext): Promise<readonly TransferLockedRule[]> | readonly TransferLockedRule[];
368
+ /** Rules each planned row must keep. */
369
+ invariants?: readonly TransferInvariant[];
370
+ /**
371
+ * Writes one chunk's planned rows through the plugin's own write paths.
372
+ * A `lookup` field's value is the resolved record's id, or — when the
373
+ * person chose to create it — `transferLookupNewValue(name)`: the plugin
374
+ * creates that record on its own path, once however many rows name it
375
+ * (and finds the one an earlier attempt created, when a chunk is retried).
376
+ *
377
+ * Nothing in this module or the job engine writes a record: `'records'`
378
+ * here is a transfer kind, and a row's `values` are planned values. So
379
+ * whatever a record write must derive is derived on the plugin's own path
380
+ * — for a dataset record, the data plugin's `datasetIntegrityFields` /
381
+ * `datasetIntegrityUpdate` (`referencedIds`, `filterKeys`,
382
+ * `filterValues`), which its `apply` and `revert` must call like every
383
+ * other writer of `records`.
384
+ */
385
+ apply(ctx: TransferResourceContext, chunk: TransferChunk<PlannedTransferRow>, writer: TransferApplyWriter): Promise<TransferApplyResult>;
386
+ /**
387
+ * Reverses one chunk's writes, deciding each entry with the core's
388
+ * `planTransferUndo` against the record as it is now. A conflict is
389
+ * carried out only when `decisions` says `revert`.
390
+ */
391
+ revert(ctx: TransferResourceContext, snapshot: TransferUndoSnapshot, decisions?: TransferRevertDecisions): Promise<TransferRevertResult>;
392
+ }
393
+ /** One item as the plugin reads it for a package: its manifest identity and its content. */
394
+ export interface TransferPackageItemContent<T = unknown> {
395
+ kind: string;
396
+ id: string;
397
+ slug?: string;
398
+ name?: string;
399
+ content: T;
400
+ }
401
+ /** One item a package import writes, with what the person decided for it. */
402
+ export interface TransferPackageItemWrite<T = unknown> {
403
+ /** Its index in the manifest — the row the ledger and the results name. */
404
+ row: number;
405
+ item: PackageManifestItem;
406
+ decision: PackageItemDecision;
407
+ /** The id it is written under: its own, the matched item's for a replace, a new one when kept beside an existing item. */
408
+ targetId: string;
409
+ /** A kept-both copy's new name and slug, which the write must use in place of the content's. */
410
+ rename?: {
411
+ name?: string;
412
+ slug?: string;
413
+ };
414
+ /** The content, references already rewritten by `remapIds`. */
415
+ content: T;
416
+ }
417
+ /** One step of undoing a package import, decided by the engine. */
418
+ export type TransferPackageRevertStep<T = unknown> =
419
+ /** The import created it and it is untouched since: delete it. */
420
+ {
421
+ action: 'delete';
422
+ id: string;
423
+ }
424
+ /** The import replaced it: put back what it held. */
425
+ | {
426
+ action: 'restore';
427
+ id: string;
428
+ content: T;
429
+ };
430
+ /** What a package revert did: the ids it reverted, and the ones its own rules refused, with why. */
431
+ export interface TransferPackageRevertResult {
432
+ done: string[];
433
+ refused: Array<{
434
+ id: string;
435
+ reason: string;
436
+ }>;
437
+ }
438
+ /** A plugin's rule an import cannot change, shown with its reason (an imported sequence is a draft). */
439
+ export interface TransferPackageRule {
440
+ id: string;
441
+ label: string;
442
+ reason: string;
443
+ }
444
+ /**
445
+ * The hooks a `package` resource answers with (AGL-3535). An item's kind is
446
+ * the resource key, so a package that carries several resources' items is
447
+ * read, written and undone by each owner.
448
+ *
449
+ * Matching compares content hashes: `items` hashes the same content
450
+ * `readItems` exports (`existingPackageItemsOf`), so an item exported and
451
+ * imported unchanged is `identical`. The engine plans, takes the undo
452
+ * snapshot (each replaced item's content through `readItems`, before the
453
+ * write), keeps the ledger and decides undo; the plugin reads, writes and
454
+ * reverts through its own paths.
455
+ */
456
+ export interface TransferPackageHooks<T = unknown> {
457
+ /** What the workspace holds now, for matching incoming items: kind, id, name or slug, and the content hash. */
458
+ items(ctx: TransferResourceContext): Promise<ExistingPackageItem[]>;
459
+ /** What one item names — other package items, and things of other kinds (`site`, a mailbox) the item needs. */
460
+ dependencies(item: T): PackageDependency[];
461
+ /**
462
+ * The item with its references rewritten: `idMap` maps an item key
463
+ * (`<kind>/<id>`, `packageItemKey`) to the id it now has, `''` for a
464
+ * reference the person dropped (`remapPackageReference`).
465
+ */
466
+ remapIds(item: T, idMap: ReadonlyMap<string, string>): T;
467
+ /** The content of these items, for an export and for the undo snapshot. */
468
+ readItems(ctx: TransferResourceContext, ids: readonly string[]): Promise<Array<TransferPackageItemContent<T>>>;
469
+ /**
470
+ * Writes the decided items through the plugin's own write paths, marking
471
+ * each with `writer.markApplied` the moment it lands, with the
472
+ * `targetId` as its `recordId`. Undo entries are the engine's: answer
473
+ * `undo: []`.
474
+ */
475
+ writeItems(ctx: TransferResourceContext, items: ReadonlyArray<TransferPackageItemWrite<T>>, writer: TransferApplyWriter): Promise<TransferApplyResult>;
476
+ /** Carries out the undo steps the engine decided, through the plugin's own paths. */
477
+ revertItems(ctx: TransferResourceContext, steps: ReadonlyArray<TransferPackageRevertStep<T>>): Promise<TransferPackageRevertResult>;
478
+ /**
479
+ * What the plugin's own write would refuse about this item, each a
480
+ * sentence — checked at the dry run, so a refusal is shown before Apply
481
+ * rather than discovered by it.
482
+ */
483
+ problems?(ctx: TransferResourceContext, write: TransferPackageItemWrite<T>): Promise<readonly string[]> | readonly string[];
484
+ /**
485
+ * What the workspace holds of the kinds the items name that no package
486
+ * resource owns (a mailbox, an email list), so a reference to one is
487
+ * known to resolve and one that does not can be mapped. `site` is the
488
+ * engine's own.
489
+ */
490
+ referenceTargets?(ctx: TransferResourceContext, kinds: readonly string[]): Promise<TransferReferenceKind[]>;
491
+ /** The rules an import of this resource cannot change, shown with their reasons. */
492
+ rules?: readonly TransferPackageRule[];
493
+ }
494
+ /**
495
+ * A resource's server half. A `records` kind answers every required
496
+ * {@link TransferRecordsHooks} member; a `package` kind every required
497
+ * {@link TransferPackageHooks} member — checked against the declaration at
498
+ * registration.
499
+ */
500
+ export type PluginTransferResource = Partial<TransferRecordsHooks> & Partial<TransferPackageHooks> & TransferPlanGateHooks;
501
+ /** The workspace a plan question is asked about, as the gate read it. */
502
+ export interface TransferPlanSubject {
503
+ /** The resource key, naming the instance for one declared with `instances`. */
504
+ resource: string;
505
+ orgId: string;
506
+ hostId: string | null;
507
+ /** The workspace document: its plan, subscription and per-org grants. */
508
+ org: Readonly<Record<string, unknown>>;
509
+ }
510
+ /** A refusal for the workspace's plan: 403, in the flat body every plan-gated console route answers. */
511
+ export interface TransferPlanRefusal {
512
+ status: 403;
513
+ body: TransferPlanRequiredResponse;
514
+ }
515
+ /** The plan hook a resource may answer with, beside its kind's. */
516
+ export interface TransferPlanGateHooks {
517
+ /**
518
+ * The refusal for a workspace whose plan does not carry the resource's
519
+ * `featureFlag`, or `null` when it does — the plugin's own answer, so a
520
+ * transfer refuses in the words of the plugin's other routes. Asked only
521
+ * for an intent the declaration gates, and only after the member is
522
+ * admitted. It reads `subject.org`, never the database; it may load the
523
+ * module that answers with its first call.
524
+ */
525
+ planGate?(subject: TransferPlanSubject, intent: TransferAccessIntent): Promise<TransferPlanRefusal | null> | TransferPlanRefusal | null;
526
+ }
527
+ /**
528
+ * The refusal a resource with no `planGate` gets: its plan feature as
529
+ * `code`, and a sentence naming the plan that includes it, from the same
530
+ * ladder the console's upgrade notices walk. A feature no plan carries — an
531
+ * add-on, the Event Calendar — is never offered as an upgrade: it is named
532
+ * as the add-on it is, the shell's own `blockedExtensionNotice` wording.
533
+ */
534
+ export declare function transferPlanRequired(feature: string, label: string, intent: TransferAccessIntent): TransferPlanRefusal;
535
+ /**
536
+ * The refusal for moving `subject.resource` with `intent` on the
537
+ * workspace's plan, or `null` when the plan may: no `featureFlag`, an
538
+ * exempt intent, or a plan that carries it. A key no plugin declares is
539
+ * `null` here — the route answers it as it answers any unknown resource.
540
+ */
541
+ export declare function transferPlanRefusal(subject: TransferPlanSubject, intent: TransferAccessIntent): Promise<TransferPlanRefusal | null>;
542
+ /** What is missing from `impl` for the kinds a resource declares, as sentences. */
543
+ export declare function pluginTransferResourceProblems(declared: Pick<TransferResourceDescriptor, 'key' | 'kinds' | 'exportOnly' | 'featureFlag'>, impl: PluginTransferResource): string[];
544
+ /**
545
+ * Registers the server half of a resource the plugin declared. The owner is
546
+ * the plugin whose register fn is running, or the `pluginId` passed from a
547
+ * boot declaration. Refused, naming why: no owner, a key nobody declared, a
548
+ * key another plugin declared, a declaration the core's
549
+ * `transferResourceProblems` rejects, and hooks missing for a declared kind.
550
+ * The same plugin registering again replaces its answers.
551
+ */
552
+ export declare function registerPluginTransferResource(key: string, impl: PluginTransferResource, options?: {
553
+ pluginId?: string;
554
+ }): void;
555
+ /**
556
+ * A declared resource with the server half its plugin registered. For a
557
+ * resource declared with `instances`, `key` is the whole key asked for
558
+ * (`data.dataset:abc123`) and `instance` the instance it names.
559
+ */
560
+ export type ResolvedTransferResource = ResolvedTransferResourceDeclaration & {
561
+ impl: PluginTransferResource;
562
+ instance?: string | null;
563
+ };
564
+ /** Why a resource could not be resolved: nobody declared the key, or nobody registered it. */
565
+ export declare class TransferResourceUnavailableError extends Error {
566
+ readonly key: string;
567
+ readonly reason: 'undeclared' | 'unregistered';
568
+ constructor(key: string, reason: 'undeclared' | 'unregistered', message: string);
569
+ }
570
+ /**
571
+ * The resource with this key and its server half. Throws
572
+ * {@link TransferResourceUnavailableError}: `undeclared` for a key no plugin
573
+ * declares — and for a key that names an instance of a resource declared
574
+ * without `instances`, or none of one declared with them — (a route answers
575
+ * 404), and `unregistered` for one declared and still missing after the
576
+ * app's declarations step ran once (a route answers 500 — a boot that
577
+ * dropped a registration, never "nothing to move").
578
+ */
579
+ export declare function resolveTransferResource(key: string): Promise<ResolvedTransferResource>;
580
+ /**
581
+ * Every declared resource with its server half, in config order. Throws
582
+ * naming each one declared and not registered, after the declarations step
583
+ * ran once.
584
+ */
585
+ export declare function resolveTransferResources(): Promise<ResolvedTransferResource[]>;
586
+ /** The records hooks of a resolved resource; throws for one that does not declare `records`. */
587
+ export declare function transferRecordsHooks(resource: ResolvedTransferResource): TransferRecordsHooks;
588
+ /** The package hooks of a resolved resource; throws for one that does not declare `package`. */
589
+ export declare function transferPackageHooks(resource: ResolvedTransferResource): TransferPackageHooks;
590
+ /**
591
+ * The resource's field catalog, built by the core. Throws naming every
592
+ * problem `transferFieldProblems` finds: a catalog the wizard cannot trust
593
+ * is refused before a person maps a column to it.
594
+ */
595
+ export declare function transferResourceCatalog(resource: ResolvedTransferResource, ctx: TransferResourceContext): Promise<TransferFieldCatalog>;
596
+ /**
597
+ * The match keys a resource offers in this context and the ones a person
598
+ * starts with: its fixed list (every key a default), or what its
599
+ * `matchKeys(ctx)` answers. Throws for a context that offers no key, which no
600
+ * row could be matched by.
601
+ */
602
+ export declare function transferResourceMatchKeys(resource: ResolvedTransferResource, ctx: TransferResourceContext): Promise<{
603
+ keys: MatchKeySpec[];
604
+ defaults: string[];
605
+ }>;
606
+ /**
607
+ * The plan for one chunk: the resource's own `plan`, or the core's
608
+ * `buildTransferPlan` — handed the resource's comparator when the input
609
+ * carries none.
610
+ */
611
+ export declare function planTransferResourceRows(resource: ResolvedTransferResource, ctx: TransferResourceContext, input: BuildTransferPlanInput): Promise<TransferPlan>;
612
+ /**
613
+ * The resource's starting policy for this context, kept to what holds for
614
+ * `fields` (`transferPolicyDefaultsFor`); `{}` for a resource that starts
615
+ * from the core's defaults.
616
+ */
617
+ export declare function transferResourcePolicyDefaults(resource: ResolvedTransferResource, ctx: TransferResourceContext, fields: readonly TransferField[]): Promise<TransferPolicyDefaults>;
618
+ /**
619
+ * Each row's match outcome: the core's `matchRows`, then the resource's own
620
+ * `match` over it when it has one. `records` holds what `lookup` read and
621
+ * whatever the resource's matching added. An answer that is not one outcome
622
+ * per row is refused — a short list would shift every row's verdict.
623
+ */
624
+ export declare function matchTransferResourceRows(resource: ResolvedTransferResource, ctx: TransferResourceContext, input: Omit<TransferMatchInput, 'outcomes'>): Promise<{
625
+ outcomes: RowMatchOutcome[];
626
+ records: ReadonlyMap<string, Readonly<Record<string, unknown>>>;
627
+ }>;
628
+ /** The resource's locked rules, or none. */
629
+ export declare function transferResourceLockedRules(resource: ResolvedTransferResource, ctx: TransferResourceContext): Promise<readonly TransferLockedRule[]>;
630
+ /** One planned row that breaks one of the resource's invariants. */
631
+ export interface TransferInvariantFailure {
632
+ row: number;
633
+ invariant: string;
634
+ message: string;
635
+ }
636
+ /**
637
+ * Every planned row that would write and breaks an invariant, checked
638
+ * against the record as it was read (`existing`, by record id). Rows that
639
+ * write nothing (`skip`, `fail`, `unchanged`) are not checked.
640
+ */
641
+ export declare function transferInvariantFailures(invariants: readonly TransferInvariant[] | undefined, rows: readonly PlannedTransferRow[], existing: ReadonlyMap<string, Readonly<Record<string, unknown>>>): TransferInvariantFailure[];
642
+ /** Only for specs: forgets every registered server half. */
643
+ export declare function resetTransferResourcesForTests(): void;
644
+ /** Where in the wizard a plugin's own step goes: after one of the core's steps. */
645
+ export type TransferWizardStepId = 'upload' | 'mapping' | 'values' | 'matching' | 'conflicts' | 'dryRun' | 'apply';
646
+ /** The core wizard's steps, in order. */
647
+ export declare const TRANSFER_WIZARD_STEPS: readonly TransferWizardStepId[];
648
+ /** What a plugin's own wizard step is handed. */
649
+ export interface TransferWizardStepProps {
650
+ resource: string;
651
+ orgId: string;
652
+ hostId: string | null;
653
+ /** The job, once the upload has made one. */
654
+ jobId: string | null;
655
+ /** The step's answer so far: what it last passed to `setValue`. */
656
+ value: unknown;
657
+ /** Keeps the step's answer, sent with the dry run under the step's `id` in `extras` for the server half to check. */
658
+ setValue(value: unknown): void;
659
+ /** Whether the step is done; the wizard holds Next until it is. */
660
+ setComplete(complete: boolean): void;
661
+ }
662
+ /** A plugin's own step in the import wizard. */
663
+ export interface TransferWizardStep {
664
+ id: string;
665
+ label: string;
666
+ /** The core step it follows. */
667
+ after: TransferWizardStepId;
668
+ component: ComponentType<TransferWizardStepProps>;
669
+ }
670
+ /** How the hub and the wizard show a resource. */
671
+ export interface PluginTransferResourceUi {
672
+ /** The name on the hub and the wizard's title; the declaration's label is the fallback. */
673
+ label: string;
674
+ icon?: MdiIconProps;
675
+ extraSteps?: readonly TransferWizardStep[];
676
+ /**
677
+ * For a resource declared with `instances`: the record list kind
678
+ * (`registerPluginRecordListSource`) its instances are listed from, so the
679
+ * Import & export hub can offer each one (`dataset` for a dataset's
680
+ * records). Without it the hub cannot name an instance and leaves the
681
+ * resource to the plugin's own surface.
682
+ */
683
+ instancesFrom?: string;
684
+ }
685
+ /**
686
+ * Registers the client half of a resource the plugin declared, from its
687
+ * console registrar. Refused on the same terms as the server half — no
688
+ * owner, an undeclared key, another plugin's key — and for an extra step
689
+ * that follows no core step or repeats another's id.
690
+ */
691
+ export declare function registerPluginTransferResourceUi(key: string, ui: PluginTransferResourceUi, options?: {
692
+ pluginId?: string;
693
+ }): void;
694
+ /** The client half registered for a resource — or for the resource a key names an instance of — or `null`. */
695
+ export declare function pluginTransferResourceUi(key: string): (PluginTransferResourceUi & {
696
+ pluginId: string;
697
+ }) | null;
698
+ /** Every registered client half, in registration order. */
699
+ export declare function listPluginTransferResourceUis(): Array<{
700
+ key: string;
701
+ pluginId: string;
702
+ }>;
703
+ /**
704
+ * The wizard's steps for a resource: the core's, with the plugin's own
705
+ * inserted after the step each names, in the order the plugin lists them.
706
+ */
707
+ export declare function transferWizardSteps(key: string): Array<{
708
+ id: string;
709
+ core: true;
710
+ } | (TransferWizardStep & {
711
+ core: false;
712
+ })>;
713
+ /** Only for specs: forgets every registered client half. */
714
+ export declare function resetTransferResourceUisForTests(): void;