@kardalum/plugin-sdk 0.19.0 → 0.21.0

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 (552) hide show
  1. package/CHANGELOG.md +281 -0
  2. package/README.md +19 -0
  3. package/dist/admin-section-registry.d.ts +48 -1
  4. package/dist/admin-section-registry.js +90 -0
  5. package/dist/built-in-editor-ids.d.ts +1 -1
  6. package/dist/built-in-editor-ids.js +2 -20
  7. package/dist/built-in-settings-schemas.d.ts +10 -0
  8. package/dist/built-in-settings-schemas.js +86 -0
  9. package/dist/built-in-value-schemas.js +35 -0
  10. package/dist/built-ins.js +38 -7
  11. package/dist/capabilities.d.ts +11 -1
  12. package/dist/capabilities.js +101 -4
  13. package/dist/cli.d.ts +66 -0
  14. package/dist/cli.js +22 -0
  15. package/dist/consent-entry.d.ts +11 -0
  16. package/dist/consent-entry.js +18 -0
  17. package/dist/content-library.d.ts +102 -0
  18. package/dist/content-library.js +15 -0
  19. package/dist/content-list-extensions.d.ts +50 -0
  20. package/dist/content-list-extensions.js +11 -0
  21. package/dist/content-picker/page-picker-sheet.d.ts +15 -0
  22. package/dist/content-picker/page-picker-sheet.js +105 -0
  23. package/dist/content-picker/page-picker.d.ts +18 -0
  24. package/dist/content-picker/page-picker.js +20 -0
  25. package/dist/content-picker/page-tree.d.ts +25 -0
  26. package/dist/content-picker/page-tree.js +132 -0
  27. package/dist/data-type-plugin.d.ts +7 -1
  28. package/dist/datatype-validation.d.ts +4 -9
  29. package/dist/datatype-validation.js +147 -1
  30. package/dist/datatypes-entry.d.ts +1 -0
  31. package/dist/datatypes-entry.js +2 -0
  32. package/dist/entitlement-entry.d.ts +1 -1
  33. package/dist/entitlement-entry.js +1 -1
  34. package/dist/entitlement-gate.d.ts +14 -0
  35. package/dist/entitlement-gate.js +64 -7
  36. package/dist/entitlement-plan.d.ts +6 -0
  37. package/dist/entitlement-plan.js +10 -0
  38. package/dist/entitlement-types.d.ts +53 -12
  39. package/dist/entitlement.d.ts +31 -4
  40. package/dist/entitlement.js +58 -17
  41. package/dist/hook-entry.d.ts +5 -0
  42. package/dist/hook-entry.js +30 -0
  43. package/dist/host-entry.d.ts +7 -1
  44. package/dist/host-entry.js +14 -1
  45. package/dist/index.d.ts +67 -7
  46. package/dist/index.js +94 -6
  47. package/dist/mail.d.ts +34 -0
  48. package/dist/mail.js +1 -0
  49. package/dist/manifest-entry.d.ts +47 -4
  50. package/dist/manifest-entry.js +63 -2
  51. package/dist/manifest-schema.d.ts +993 -40
  52. package/dist/manifest-schema.js +516 -26
  53. package/dist/manifest.d.ts +1186 -62
  54. package/dist/manifest.js +8 -4
  55. package/dist/media/media-picker.js +31 -18
  56. package/dist/media/upload-error.d.ts +5 -1
  57. package/dist/media/upload-error.js +14 -2
  58. package/dist/media-library.d.ts +32 -0
  59. package/dist/media-library.js +15 -0
  60. package/dist/nested-field-host.d.ts +76 -0
  61. package/dist/nested-field-host.js +90 -0
  62. package/dist/notify.d.ts +12 -4
  63. package/dist/notify.js +1 -1
  64. package/dist/outbound.d.ts +47 -0
  65. package/dist/outbound.js +1 -0
  66. package/dist/plugin-context.d.ts +52 -0
  67. package/dist/plugin-context.js +27 -0
  68. package/dist/plugin-permissions.d.ts +18 -0
  69. package/dist/plugin-permissions.js +25 -0
  70. package/dist/plugin-screen-context.d.ts +262 -9
  71. package/dist/plugin-screen-context.js +56 -0
  72. package/dist/providers.d.ts +313 -0
  73. package/dist/providers.js +74 -0
  74. package/dist/read-all-pages.d.ts +5 -0
  75. package/dist/read-all-pages.js +3 -2
  76. package/dist/render-page.d.ts +15 -0
  77. package/dist/render-page.js +20 -0
  78. package/dist/richtext/block-panel.d.ts +12 -1
  79. package/dist/richtext/block-panel.js +36 -25
  80. package/dist/richtext/button-view.d.ts +11 -0
  81. package/dist/richtext/button-view.js +45 -0
  82. package/dist/richtext/content-guard.d.ts +4 -0
  83. package/dist/richtext/content-guard.js +27 -0
  84. package/dist/richtext/editor-handle.d.ts +34 -0
  85. package/dist/richtext/editor-handle.js +225 -0
  86. package/dist/richtext/extensions.d.ts +6 -0
  87. package/dist/richtext/extensions.js +16 -0
  88. package/dist/richtext/insert-menu.d.ts +6 -1
  89. package/dist/richtext/insert-menu.js +45 -22
  90. package/dist/richtext/item-attributes.d.ts +6 -0
  91. package/dist/richtext/item-attributes.js +19 -0
  92. package/dist/richtext/item-panel.d.ts +25 -0
  93. package/dist/richtext/item-panel.js +118 -0
  94. package/dist/richtext/item-view.d.ts +58 -0
  95. package/dist/richtext/item-view.js +172 -0
  96. package/dist/richtext/mark-form.d.ts +10 -0
  97. package/dist/richtext/mark-form.js +38 -0
  98. package/dist/richtext/paste-choice.d.ts +9 -0
  99. package/dist/richtext/paste-choice.js +13 -0
  100. package/dist/richtext/plugin-items.d.ts +72 -0
  101. package/dist/richtext/plugin-items.js +562 -0
  102. package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
  103. package/dist/richtext/plugin-mark-tooltips.js +44 -0
  104. package/dist/richtext/plugin-toolbar.d.ts +57 -0
  105. package/dist/richtext/plugin-toolbar.js +186 -0
  106. package/dist/richtext/rich-item-icons.d.ts +5 -0
  107. package/dist/richtext/rich-item-icons.js +42 -0
  108. package/dist/richtext/rich-items.d.ts +42 -0
  109. package/dist/richtext/rich-items.js +68 -0
  110. package/dist/richtext/rich-text-view-host.d.ts +24 -0
  111. package/dist/richtext/rich-text-view-host.js +11 -0
  112. package/dist/richtext/style-listbox.js +6 -4
  113. package/dist/richtext/toolbar-button.d.ts +16 -0
  114. package/dist/richtext/toolbar-button.js +9 -0
  115. package/dist/richtext/url-paste.d.ts +20 -0
  116. package/dist/richtext/url-paste.js +82 -0
  117. package/dist/richtext-html-entry.d.ts +5 -0
  118. package/dist/richtext-html-entry.js +11 -0
  119. package/dist/sdk-strings.d.ts +344 -0
  120. package/dist/sdk-strings.js +411 -0
  121. package/dist/sealing.d.ts +14 -0
  122. package/dist/sealing.js +1 -0
  123. package/dist/service-contract.d.ts +17 -0
  124. package/dist/service-contract.js +39 -0
  125. package/dist/services.d.ts +114 -0
  126. package/dist/services.js +1 -0
  127. package/dist/simple-storage-value-provider.js +24 -24
  128. package/dist/structured-storage-types.d.ts +429 -9
  129. package/dist/tailwind.js +10 -5
  130. package/dist/template-reads.d.ts +16 -0
  131. package/dist/template-reads.js +21 -0
  132. package/dist/testing-entry.d.ts +38 -0
  133. package/dist/testing-entry.js +173 -0
  134. package/dist/text-entry.d.ts +1 -0
  135. package/dist/text-entry.js +7 -0
  136. package/dist/tokens/system-dark.css +1 -0
  137. package/dist/tokens/tailwind-theme.css +7 -0
  138. package/dist/tokens/tokens.css +19 -3
  139. package/dist/tokens/tokens.json +13 -4
  140. package/dist/uploads.d.ts +43 -0
  141. package/dist/uploads.js +1 -0
  142. package/dist/user-library.d.ts +51 -0
  143. package/dist/user-library.js +15 -0
  144. package/dist/view-helpers.d.ts +18 -0
  145. package/dist/view-helpers.js +64 -0
  146. package/dist/views/asset-view.js +4 -1
  147. package/dist/views/content-list-preview.js +3 -1
  148. package/dist/views/content-list-settings-view.js +11 -7
  149. package/dist/views/content-list-view.d.ts +5 -3
  150. package/dist/views/content-list-view.js +243 -40
  151. package/dist/views/content-picker-view.d.ts +3 -0
  152. package/dist/views/content-picker-view.js +143 -0
  153. package/dist/views/crop-view.d.ts +4 -6
  154. package/dist/views/crop-view.js +22 -13
  155. package/dist/views/date-range-view.js +4 -1
  156. package/dist/views/file-upload-view.d.ts +5 -7
  157. package/dist/views/file-upload-view.js +16 -7
  158. package/dist/views/group-view.d.ts +8 -0
  159. package/dist/views/group-view.js +123 -0
  160. package/dist/views/html-view.js +7 -6
  161. package/dist/views/image-view.js +37 -19
  162. package/dist/views/link-view.d.ts +3 -0
  163. package/dist/views/link-view.js +150 -0
  164. package/dist/views/options-list-view.d.ts +3 -0
  165. package/dist/views/options-list-view.js +104 -0
  166. package/dist/views/repeatable-list-view.d.ts +3 -0
  167. package/dist/views/repeatable-list-view.js +113 -0
  168. package/dist/views/rich-text-view.d.ts +2 -0
  169. package/dist/views/rich-text-view.js +208 -35
  170. package/dist/views/suggest-key.d.ts +17 -0
  171. package/dist/views/suggest-key.js +55 -0
  172. package/dist/views/unreadable-rich-text.d.ts +17 -0
  173. package/dist/views/unreadable-rich-text.js +40 -0
  174. package/dist/visitors.d.ts +81 -0
  175. package/dist/visitors.js +1 -0
  176. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
  177. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
  178. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
  179. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
  180. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +334 -0
  181. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +254 -0
  182. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
  183. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
  184. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
  185. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
  186. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +11 -1
  187. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
  188. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +8 -0
  189. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +38 -0
  190. package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
  191. package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +144 -0
  192. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
  193. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
  194. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +137 -2
  195. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +178 -2
  196. package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
  197. package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
  198. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
  199. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
  200. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
  201. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
  202. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
  203. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
  204. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
  205. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
  206. package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
  207. package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
  208. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
  209. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
  210. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
  211. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
  212. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +55 -13
  213. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +22 -10
  214. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
  215. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +8 -0
  216. package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
  217. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
  218. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
  219. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +257 -15
  220. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +78 -5
  221. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
  222. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +90 -5
  223. package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
  224. package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
  225. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
  226. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
  227. package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
  228. package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
  229. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
  230. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
  231. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
  232. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
  233. package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
  234. package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
  235. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
  236. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
  237. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +162 -48
  238. package/node_modules/@kardalum/api-schemas/dist/index.js +137 -30
  239. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
  240. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
  241. package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
  242. package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
  243. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
  244. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
  245. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
  246. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
  247. package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +226 -0
  248. package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +409 -0
  249. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
  250. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
  251. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
  252. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
  253. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +490 -10
  254. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +53 -3
  255. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
  256. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
  257. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
  258. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
  259. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
  260. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
  261. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
  262. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
  263. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
  264. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
  265. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
  266. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
  267. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
  268. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
  269. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +38 -0
  270. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
  271. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
  272. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
  273. package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
  274. package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
  275. package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
  276. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +5 -0
  277. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +8 -0
  278. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
  279. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
  280. package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +60 -0
  281. package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +333 -0
  282. package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
  283. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
  284. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
  285. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
  286. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
  287. package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
  288. package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
  289. package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
  290. package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
  291. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
  292. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
  293. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
  294. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
  295. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
  296. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
  297. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
  298. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
  299. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
  300. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
  301. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
  302. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
  303. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
  304. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
  305. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +44 -0
  306. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +84 -0
  307. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
  308. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
  309. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
  310. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
  311. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
  312. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
  313. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
  314. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
  315. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
  316. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
  317. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
  318. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
  319. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
  320. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
  321. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +44 -2
  322. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +44 -2
  323. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +16 -5
  324. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
  325. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
  326. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +34 -0
  327. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +102 -0
  328. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +43 -0
  329. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +126 -0
  330. package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
  331. package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
  332. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
  333. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
  334. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
  335. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
  336. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
  337. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
  338. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +119 -0
  339. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +216 -0
  340. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
  341. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
  342. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
  343. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
  344. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +46 -0
  345. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +41 -1
  346. package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +304 -2
  347. package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +220 -6
  348. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
  349. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
  350. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
  351. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
  352. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
  353. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
  354. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +408 -14
  355. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +307 -23
  356. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +23 -1
  357. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +61 -3
  358. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
  359. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
  360. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +23 -1
  361. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +37 -1
  362. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
  363. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
  364. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
  365. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
  366. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
  367. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
  368. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +346 -0
  369. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +461 -0
  370. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
  371. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
  372. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
  373. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
  374. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
  375. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
  376. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
  377. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
  378. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
  379. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
  380. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
  381. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
  382. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
  383. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
  384. package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
  385. package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
  386. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +352 -0
  387. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +409 -0
  388. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +347 -0
  389. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +976 -0
  390. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
  391. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
  392. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
  393. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +47 -4
  394. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
  395. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
  396. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
  397. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
  398. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
  399. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
  400. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
  401. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
  402. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
  403. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
  404. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
  405. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
  406. package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
  407. package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
  408. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
  409. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
  410. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
  411. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
  412. package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
  413. package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
  414. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +307 -4
  415. package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
  416. package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
  417. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
  418. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
  419. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +71 -0
  420. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +540 -0
  421. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
  422. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +394 -0
  423. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
  424. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
  425. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
  426. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
  427. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +201 -1
  428. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
  429. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
  430. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
  431. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +97 -8
  432. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +64 -1
  433. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +136 -0
  434. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +53 -2
  435. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
  436. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
  437. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +386 -0
  438. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +618 -0
  439. package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
  440. package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
  441. package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
  442. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
  443. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
  444. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
  445. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +70 -0
  446. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +188 -0
  447. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
  448. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
  449. package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
  450. package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
  451. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
  452. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
  453. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
  454. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
  455. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +72 -1
  456. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +36 -3
  457. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
  458. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
  459. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
  460. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
  461. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
  462. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
  463. package/node_modules/@kardalum/api-schemas/package.json +2 -0
  464. package/node_modules/@kardalum/design-tokens/dist/build-css.js +15 -1
  465. package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
  466. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +7 -0
  467. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +2 -1
  468. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
  469. package/node_modules/@kardalum/design-tokens/dist/tokens.css +19 -3
  470. package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
  471. package/node_modules/@kardalum/design-tokens/dist/tokens.js +18 -3
  472. package/node_modules/@kardalum/design-tokens/dist/tokens.json +13 -4
  473. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +5 -1
  474. package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +38 -2
  475. package/node_modules/@kardalum/plugin-package/dist/build-reference.js +17 -2
  476. package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
  477. package/node_modules/@kardalum/plugin-package/dist/capabilities.js +625 -35
  478. package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
  479. package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +25 -0
  480. package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
  481. package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
  482. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
  483. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
  484. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
  485. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
  486. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
  487. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
  488. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
  489. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
  490. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
  491. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
  492. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
  493. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +47 -0
  494. package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
  495. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
  496. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +40 -0
  497. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
  498. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
  499. package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
  500. package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +3 -0
  501. package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +3 -0
  502. package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +76 -6
  503. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
  504. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +99 -0
  505. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
  506. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
  507. package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
  508. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
  509. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
  510. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +5 -0
  511. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +316 -0
  512. package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +40 -4
  513. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
  514. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
  515. package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
  516. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
  517. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +150 -0
  518. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
  519. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
  520. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
  521. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
  522. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
  523. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +69 -0
  524. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
  525. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
  526. package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +17 -0
  527. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
  528. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
  529. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
  530. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
  531. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +8 -2
  532. package/node_modules/@kardalum/plugin-package/dist/index.js +7 -1
  533. package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
  534. package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
  535. package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
  536. package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
  537. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
  538. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
  539. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
  540. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
  541. package/node_modules/@kardalum/plugin-package/package.json +4 -0
  542. package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
  543. package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
  544. package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
  545. package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
  546. package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
  547. package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
  548. package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
  549. package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
  550. package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
  551. package/node_modules/@kardalum/ui/dist/index.js +2 -0
  552. package/package.json +25 -3
@@ -1,10 +1,20 @@
1
1
  import { z } from "zod";
2
+ import { UNINSTALL_SAMPLE_PAGES_MAX } from "./plugin-kept-parts.js";
3
+ import { END_EFFECTS, LicenseVerdictEndWireSchema } from "./sale-conditions.schema.js";
2
4
  import { PluginReadOnlyNoticeSchema } from "./plugin-read-only.schema.js";
5
+ import { ActionStringSchema } from "./action.schema.js";
3
6
  import { PluginRoleOfferSchema } from "./plugin-actions.schema.js";
7
+ import { PLUGIN_ACTION_OFFER_TARGETS } from "./plugin-manifest-actions.js";
8
+ import { PluginLabelSchema } from "./plugin-labels.js";
4
9
  import { InstallRoleOutcomeSchema } from "./plugin-install-record.schema.js";
5
10
  import { SampleContentOutcomeSchema } from "./sample-content-outcome.schema.js";
11
+ import { SignInSwitchedOffSchema } from "./install-sign-in-switched-off.schema.js";
6
12
  import { InstallWarningsSchema } from "./install-warnings.schema.js";
13
+ import { RICH_TEXT_NODES_PER_PLUGIN_MAX } from "./plugin-rich-text.js";
7
14
  import { STORAGE_TYPES } from "./plugin-vocabulary.js";
15
+ import { SITE_REACH_RESETS_MAX } from "./licensing.schema.js";
16
+ import { PROVIDER_KINDS, PROVIDER_TABLE_KINDS } from "./plugin-providers.js";
17
+ import { SERVICE_CLOSING_NOTICE_KIND, SHARING_NOTICE_KIND, SITE_KEY_MAX, STAGING_NOTICE_KIND, SharingNoticeSchema } from "./marketplace-sites.schema.js";
8
18
  // The ADMIN management view of the registry (S135): unlike the public
9
19
  // GET /api/plugins (enabled-only, boot-loader metadata), this surface
10
20
  // lists every installed plugin, disabled included. licenseStatus reflects
@@ -49,10 +59,29 @@ import { STORAGE_TYPES } from "./plugin-vocabulary.js";
49
59
  * role with its id already exists, so the view can hide "Create role"
50
60
  * without reading the roles list (which needs roles.read). */
51
61
  export const ManagedPluginRoleOfferSchema = PluginRoleOfferSchema.extend({ created: z.boolean() });
62
+ /** M33 K29: an action the attached manifest offers to the roles holding `target`; `applied` once
63
+ * it was given (at install or by Apply), otherwise it waits with "Apply". `default` is the derived
64
+ * tick of the install screen. */
65
+ export const ManagedPluginActionOfferSchema = z.object({
66
+ // A plugin offers only its own action, so the reference's example names one (never a core action).
67
+ action: ActionStringSchema.meta({ example: "com.example.words.panel.view" }),
68
+ label: PluginLabelSchema,
69
+ target: z.enum(PLUGIN_ACTION_OFFER_TARGETS),
70
+ default: z.boolean(),
71
+ applied: z.boolean(),
72
+ });
73
+ /** M33 K29: what Apply gave: the offered action, its target, and the roles that gained it. */
74
+ export const ActionOfferAppliedResponseSchema = z.object({ action: ActionStringSchema.meta({ example: "com.example.words.panel.view" }), target: z.enum(PLUGIN_ACTION_OFFER_TARGETS), roles: z.array(z.string()) });
52
75
  /** S284b: the marketplace's classification of an installed package that is
53
76
  * not the one it delivered for the licence (the verdict's `tamper`). */
54
77
  export const PluginTamperKindSchema = z.enum(["foreign-package", "sideloaded", "modified-on-disk"]);
78
+ /** M32 I (R12): what switching a plugin off does, derived from what it declares. */
79
+ export const SWITCH_OFF_EFFECTS = ["keepsSiteContent", "hidesScreens", "stopsServerCode", "stopsTemplateExtensions", "providersFallBack", "richTextItemsFallBack"];
55
80
  export const ManagedPluginSchema = z.object({
81
+ switchOffEffects: z.array(z.enum(SWITCH_OFF_EFFECTS)),
82
+ // M35 B1a (design 4.9): the switched-on plugins that use this one optionally and would lose it at a
83
+ // switch-off or uninstall; the admin warns, nothing is refused. Experimental.
84
+ optionalUsers: z.array(z.object({ pluginId: z.string(), name: z.string(), contracts: z.array(z.string()) }).strict()).optional(),
56
85
  pluginId: z.string(),
57
86
  // S318: present only when the licence term lapsed (the plugin is read-only).
58
87
  readOnly: PluginReadOnlyNoticeSchema.optional(),
@@ -79,6 +108,11 @@ export const ManagedPluginSchema = z.object({
79
108
  // marketplace operator's reason for a `domain_blocked` answer, which the
80
109
  // admin shows after its sentence. Null when the verdict carried none.
81
110
  licenseReasonDetail: z.string().nullable(),
111
+ // S367b: the signed notice of the stored verdict, read through the shared
112
+ // schema. Optional so an answer from a server before it still reads.
113
+ licenseNotice: SharingNoticeSchema.nullable()
114
+ .optional()
115
+ .describe("A notice the marketplace signed on the stored verdict: where the key was refused while a sharing case is under 30 days old (key-seen-elsewhere), the seated site this staging site belongs to (staging-site), or the day Kardalum's licence service ends, after which this site checks no more (service-closing). Null when there is none."),
82
116
  licenseLastValidatedAt: z.string().nullable(),
83
117
  // S284b: the newest issuedAt of any valid verdict this site has stored
84
118
  // (ISO), the clock the grace period runs on. Null before the first one.
@@ -99,10 +133,46 @@ export const ManagedPluginSchema = z.object({
99
133
  // reads the free text. Null when the last check succeeded; absent from a
100
134
  // server before it (the admin then reads it as unreachable).
101
135
  licenseLastAttemptKind: z
102
- .enum(["unreachable", "rejected", "site-domain-missing"])
136
+ .enum(["unreachable", "rejected", "site-domain-missing", "site-domain-needed"])
137
+ .nullable()
138
+ .optional()
139
+ .describe("What the last failed licence check ran into: unreachable (the licence server could not be reached), rejected (it answered, but the answer did not verify) site-domain-missing (no KARDALUM_SITE_DOMAIN is set, so no request was made) or site-domain-needed (no KARDALUM_SITE_DOMAIN is set on a site that answers public visitors, so no request was made). Null when the last check succeeded."),
140
+ // M32 I6f: the stored end of the licence and the term facts the notices read.
141
+ licenseEndEffect: z.enum(END_EFFECTS).nullable().optional(),
142
+ licenseEndRefunded: z.boolean().nullable().optional(),
143
+ licenseCancelAtPeriodEnd: z.boolean().nullable().optional(),
144
+ licenseTermEndsAt: z.string().nullable().optional(),
145
+ // M32 I6f (S11, S12): what the site loses when the licence switches the plugin off, for a plugin
146
+ // with a licence row (absent or null otherwise): each role it holds on this site (a chosen search,
147
+ // form protection, mail or media store provider, a media store keeping files, a switched-on
148
+ // sign-in provider), the files its media stores keep, the people who sign in only through its
149
+ // switched-on sign-in providers and how many of them hold an action of SIGN_IN_BARRED_ACTIONS,
150
+ // and, when it is the chosen mail sender, whether the built-in sender is set up.
151
+ licenseProviderRoles: z
152
+ .array(z.enum(PROVIDER_TABLE_KINDS))
153
+ .nullable()
154
+ .optional()
155
+ .describe("For a licensed plugin, the roles it holds on this site: each kind it is the chosen provider of, mediaStore when its stores keep files, signIn when one of its sign-in providers is switched on, signInStep when one of its sign-in steps is switched on. Null for a plugin with no licence."),
156
+ licenseStoredFiles: z.number().int().nonnegative().nullable().optional().describe("For a licensed plugin, the files its media stores keep. Null for a plugin with no licence."),
157
+ licenseSignInOnlyWayCount: z
158
+ .number()
159
+ .int()
160
+ .nonnegative()
161
+ .nullable()
162
+ .optional()
163
+ .describe("For a licensed plugin with a switched-on sign-in provider, the people with no password whose only way in is one of its sign-in providers. Null otherwise."),
164
+ licenseSignInOnlyWayManagers: z
165
+ .number()
166
+ .int()
167
+ .nonnegative()
103
168
  .nullable()
104
169
  .optional()
105
- .describe("What the last failed licence check ran into: unreachable (the licence server could not be reached), rejected (it answered, but the answer did not verify) or site-domain-missing (no KARDALUM_SITE_DOMAIN is set, so no request was made). Null when the last check succeeded."),
170
+ .describe("Of licenseSignInOnlyWayCount, the people whose role manages the site (holds an action of SIGN_IN_BARRED_ACTIONS). Null with it."),
171
+ licenseBuiltInMailReady: z
172
+ .boolean()
173
+ .nullable()
174
+ .optional()
175
+ .describe("For a licensed plugin that is the chosen mail sender, whether the built-in sender is set up in Server settings, so email goes on once the plugin is off. Null otherwise."),
106
176
  boundDomain: z.string().nullable(),
107
177
  // S284b: what THIS row's `enabled` was when a grace lock closed (the
108
178
  // registry row's own value since the fix wave, so a bundle member keeps
@@ -136,6 +206,34 @@ export const ManagedPluginSchema = z.object({
136
206
  // accepted from the installed-plugins view. Empty when the manifest is
137
207
  // not attached (package missing at boot) or offers nothing.
138
208
  roleOffers: z.array(ManagedPluginRoleOfferSchema),
209
+ // M33 K29: the actions the attached manifest offers to the roles holding a core action, each
210
+ // saying whether it was applied. Absent when it offers none (or is not attached).
211
+ actionOffers: z.array(ManagedPluginActionOfferSchema).optional(),
212
+ // M32 F4 (D10): how many secrets the attached manifest declares, so the admin offers the Secrets
213
+ // card only for a plugin that has some. 0 when the manifest is not attached. Optional so an
214
+ // answer from a server before it still reads.
215
+ secretCount: z
216
+ .number()
217
+ .int()
218
+ .nonnegative()
219
+ .optional()
220
+ .describe("How many secrets the plugin's attached manifest declares (0 when it declares none or is not attached). Values are never listed here."),
221
+ // M32 F4d (D3, D13): how many plugin settings fields and scheduled tasks the attached manifest
222
+ // declares, so the admin offers the Settings page only where there is something on it.
223
+ settingsCount: z
224
+ .number()
225
+ .int()
226
+ .nonnegative()
227
+ .optional()
228
+ .describe("How many plugin settings fields the plugin's attached manifest declares (0 when it declares none or is not attached). Values are never listed here."),
229
+ // M35 B1a: whether the attached manifest offers, uses, owns or raises anything, so the admin offers Connections.
230
+ servicesDeclared: z.boolean().optional().describe("Whether the plugin's attached manifest declares service contracts, offers, uses or plugin events. Experimental."),
231
+ taskCount: z
232
+ .number()
233
+ .int()
234
+ .nonnegative()
235
+ .optional()
236
+ .describe("How many scheduled tasks the plugin's attached manifest declares (0 when it declares none or is not attached)."),
139
237
  // S274c: distinct roles holding any of this plugin's actions, for the
140
238
  // uninstall dialog.
141
239
  grantedRoleCount: z.number().int().nonnegative(),
@@ -170,6 +268,45 @@ export const ManagedPluginListResponseSchema = z.object({
170
268
  // says the licence server is unreachable (KARDALUM_LICENSE_STALE_WARN_DAYS),
171
269
  // so the admin no longer mirrors the default.
172
270
  licenseStaleWarnDays: z.number().int().positive().optional(),
271
+ // S367g (D1): the browser origin of the active marketplace, so the admin
272
+ // builds its licence notices' links from it. Null when no marketplace is
273
+ // configured; absent from a server before S367g.
274
+ marketplaceOrigin: z
275
+ .string()
276
+ .nullable()
277
+ .optional()
278
+ .describe("The browser origin of the active marketplace, which the admin builds the licence notices' links to the legal texts from. Null when no marketplace is configured."),
279
+ // S367g (D4): when this site was last reached from the public internet,
280
+ // sent only for an unset or local declared domain and a time under 30
281
+ // days old, so the admin can say so and offer the reset.
282
+ siteReachedPublicAt: z
283
+ .string()
284
+ .datetime()
285
+ .nullable()
286
+ .optional()
287
+ .describe("When this site last answered a request from a public address or under a public name (ISO 8601), sent only when KARDALUM_SITE_DOMAIN is unset or local and that time is under 30 days old. Null otherwise. POST /settings/site-reach/reset clears it."),
288
+ // M32 I6c (U15): the reset's offer and history, computed over every
289
+ // installed plugin rather than the page, sent only to a session whose role
290
+ // holds settings.update.
291
+ siteReachResetOffered: z
292
+ .boolean()
293
+ .optional()
294
+ .describe("Whether to offer POST /settings/site-reach/reset: the site counts as reached publicly and an installed plugin's stored verdict is public_visitors with no tamper finding. Sent only to a session whose role holds settings.update."),
295
+ siteReachResetAt: z
296
+ .string()
297
+ .datetime()
298
+ // An earlier time than siteReachedPublicAt's example, so the reference's
299
+ // example reads as a site reached again after its last reset.
300
+ .meta({ example: "2026-01-08T09:30:00.000Z" })
301
+ .nullable()
302
+ .optional()
303
+ .describe("When the site was last marked not public (ISO 8601), null before any reset. Sent only to a session whose role holds settings.update."),
304
+ siteReachResets: z
305
+ .array(z.string().datetime())
306
+ .max(SITE_REACH_RESETS_MAX)
307
+ .meta({ example: ["2026-01-08T09:30:00.000Z", "2025-12-02T14:00:00.000Z"] })
308
+ .optional()
309
+ .describe("The times of the last ten resets, newest first (the first is siteReachResetAt). Sent only to a session whose role holds settings.update."),
173
310
  });
174
311
  export const PluginIdParamsSchema = z.object({
175
312
  pluginId: z.string().min(1),
@@ -183,10 +320,24 @@ export const PluginIdParamsSchema = z.object({
183
320
  export const UninstallPluginBodySchema = z
184
321
  .object({
185
322
  confirmStructuredDataCleanup: z.boolean().optional(),
186
- // S293: the uninstall mirror; absent means true, and each only acts on
187
- // what the install record holds.
323
+ // S293: the uninstall mirror; each only acts on what the install record holds. M35
324
+ // (2026-11-22): removeSampleContent absent means false (nothing is moved to the Recycle Bin);
325
+ // true moves the sample pages the owner has not edited, or exactly samplePageIds. Nothing is
326
+ // ever deleted for good. removeRoles absent means true.
188
327
  removeSampleContent: z.boolean().optional(),
328
+ samplePageIds: z
329
+ .array(z.string().min(1))
330
+ .max(UNINSTALL_SAMPLE_PAGES_MAX)
331
+ .optional()
332
+ .describe("The recorded sample pages to move to the Recycle Bin, edited or not. Read only with removeSampleContent; an id the install record does not hold is ignored."),
189
333
  removeRoles: z.boolean().optional(),
334
+ // M33 K13: absent means true. False deletes the snapshot the uninstall took (its tables, its
335
+ // settings values and its data type record, and the ones its unconfirmed attempts took since
336
+ // the plugin was installed) once the uninstall has finished. Only a session may send false.
337
+ keepSnapshot: z
338
+ .boolean()
339
+ .optional()
340
+ .describe("Absent means true. False deletes the data snapshot this uninstall takes (and those its unconfirmed attempts took) once it has finished; only a session may send it, a key gets 403."),
190
341
  })
191
342
  // S293: strict, because an absent flag means true: a misspelt opt-out
192
343
  // dropped as an unknown key would be read as consent to remove.
@@ -214,25 +365,6 @@ export const BundleUninstallConfirmationRequiredSchema = z.object({
214
365
  })),
215
366
  message: z.string(),
216
367
  });
217
- // F1 QA fix wave: the content-guard 409: a single-plugin uninstall()
218
- // blocked because one or more of its tracked document types still have
219
- // content or templates referencing them. Distinct from the two
220
- // confirmation schemas above (those are "confirm to proceed," this is a
221
- // terminal refusal the caller must resolve by hand, never retried with a
222
- // flag) and from the bare ApiErrorSchema (that still covers every OTHER
223
- // refusal this route can throw, e.g. a bundle member blocked by an outside
224
- // dependent); a separate shape so `blockedBy` only ever appears when the
225
- // server actually has a list of named blockers to put in it.
226
- // contentCount is optional: the guard only knows a count for the
227
- // "has-content" reason, not "has-templates" (document-type-service.ts's
228
- // DocumentTypeInUseError never carries one for that reason either).
229
- export const UninstallBlockedByDocumentTypesSchema = z.object({
230
- message: z.string(),
231
- blockedBy: z.array(z.object({
232
- documentType: z.string(),
233
- contentCount: z.number().int().nonnegative().optional(),
234
- })),
235
- });
236
368
  // Task 6: the 200 success body for a single-plugin DELETE: the CONFIRMED
237
369
  // pass's freshly-minted snapshotGroupId (the gate site already took it;
238
370
  // this just stops discarding it), null for a simple-storage plugin (never
@@ -323,6 +455,13 @@ export const ListingPlanSummarySchema = z.object({
323
455
  // S321 (P10): positions are 0 and up; the bound also gives the reference example a real value.
324
456
  position: z.number().int().nonnegative(),
325
457
  });
458
+ /** S367e (D21): the stored verdict's notice as the host hands it on: the
459
+ * server's own shape, capped, so the browser's type is the server's. */
460
+ export const LicenseNoticeWireSchema = z.object({
461
+ kind: z.enum([SHARING_NOTICE_KIND, STAGING_NOTICE_KIND, SERVICE_CLOSING_NOTICE_KIND]),
462
+ domain: z.string().min(1).max(SITE_KEY_MAX),
463
+ at: z.string().max(40),
464
+ });
326
465
  export const LicenseVerdictEnvelopeSchema = z.object({
327
466
  v: z.literal(1),
328
467
  alg: z.literal("ed25519"),
@@ -344,6 +483,10 @@ export const LicenseVerdictEnvelopeSchema = z.object({
344
483
  // (never by `signature`); absent on a verdict from before S317.
345
484
  planId: z.string().max(64).optional(),
346
485
  term: LicenseVerdictTermSchema.optional(),
486
+ // S367b, S367d, S367e: the signed notice, covered by noticeSignature; the three kinds the marketplace signs.
487
+ notice: LicenseNoticeWireSchema.optional(),
488
+ // M32 I6f: the signed end effect, covered by endSignature.
489
+ end: LicenseVerdictEndWireSchema.optional(),
347
490
  });
348
491
  // The tagged entitlement (S284b fix wave), the same value plugin server code
349
492
  // receives on `context.entitlement`: `exempt` on a non-production install
@@ -363,6 +506,8 @@ export const EntitlementSchema = z.discriminatedUnion("kind", [
363
506
  signature: z.string(),
364
507
  /** S317: base64 Ed25519 signature over the envelope with its plan and term appended; absent when it carries neither. */
365
508
  termSignature: z.string().optional(),
509
+ /** S367d: base64 Ed25519 signature over the envelope with its notice appended; absent when it carries none. A verified service-closing notice keeps the verdict valid without the 14-day age. */
510
+ noticeSignature: z.string().optional(),
366
511
  }),
367
512
  z.object({ kind: z.literal("none") }),
368
513
  ]);
@@ -370,6 +515,7 @@ export const EntitlementSchema = z.discriminatedUnion("kind", [
370
515
  // session; no permission beyond it, since a plugin view is gated by the
371
516
  // plugin's own action): what `useEntitlement()` reads in a plugin's admin
372
517
  // view. `valid` is the host's own check of the signature and the 14-day age
518
+ // (none for a verdict whose service-closing notice verifies, S367d)
373
519
  // (true for `exempt`, false for `none`), the answer a browser without
374
520
  // WebCrypto Ed25519 falls back to. It means authentic and fresh, whatever
375
521
  // the verdict's status: a revoked or invalid verdict is `valid: true` too,
@@ -407,15 +553,33 @@ export const SnapshotGroupSchema = z.object({
407
553
  tableNames: z.array(z.string()),
408
554
  totalTableCount: z.number().int(),
409
555
  status: z.enum(["complete", "partial"]),
556
+ /** M35 U1 (D1): present when the group holds an uninstall's records beside or instead of tables: the
557
+ * plugin settings values (named only to a caller who may change the plugin's settings) and the
558
+ * account field values. A group of records alone has no tables, and is listed so it can be deleted. */
559
+ records: z.object({ settings: z.boolean(), userFields: z.boolean() }).strict().optional(),
410
560
  });
411
561
  export const SnapshotGroupListQuerySchema = z.object({
412
562
  cursor: z.string().uuid().optional(),
413
563
  limit: z.coerce.number().int().min(1).max(100).default(50),
414
564
  });
565
+ /** M32 I3 (B9): where a restore reads the plugin's settings from. */
566
+ export const RESTORE_SOURCES = ["snapshots", "replacedSettings"];
567
+ export const SnapshotSettingsRecordSchema = z
568
+ .object({ takenAt: z.string(), fields: z.array(z.string()) })
569
+ .strict();
570
+ /** M35 U1 (D1): the newest account field record an uninstall took: when, and how many people it holds. */
571
+ export const SnapshotUserFieldsRecordSchema = z
572
+ .object({ takenAt: z.string(), people: z.number().int().nonnegative() })
573
+ .strict();
415
574
  export const SnapshotGroupListResponseSchema = z.object({
416
575
  pluginId: z.string(),
417
576
  items: z.array(SnapshotGroupSchema), // newest first
418
577
  nextCursor: z.string().nullable(),
578
+ /** M32 I3 (B9): the settings records restore can use, field ids only, never a value. */
579
+ settings: z.object({ recorded: SnapshotSettingsRecordSchema.nullable(), replaced: SnapshotSettingsRecordSchema.nullable() }).strict().optional(),
580
+ /** M35 U1 (D1): the account field record a restore fills back, to every caller; null when there is
581
+ * none or the plugin is not installed (the restore plan's rule). */
582
+ userFields: SnapshotUserFieldsRecordSchema.nullable().optional(),
419
583
  });
420
584
  // S154 Task 5: the UNION restore plan: the newest available snapshot copy
421
585
  // of each DISTINCT table this plugin has ever snapshotted, chosen
@@ -428,6 +592,38 @@ export const RestorePlanEntrySchema = z.object({
428
592
  snapshotGroupId: z.string(),
429
593
  groupTakenAt: z.string(),
430
594
  });
595
+ // M32 F4d (D2): the plugin settings values a restore writes back: the newest record an uninstall
596
+ // took, named by its snapshot row, and the ids of the fields it holds (never a value). The current
597
+ // values are kept as a safety copy first. Null when there is no record or the plugin is not installed.
598
+ export const RestoreSettingsPlanSchema = z
599
+ .object({
600
+ snapshotId: z.string(),
601
+ snapshotGroupId: z.string(),
602
+ takenAt: z.string(),
603
+ fields: z.array(z.string()),
604
+ /** M32 I3 (B9): absent reads as "snapshots". */
605
+ source: z.enum(RESTORE_SOURCES).optional(),
606
+ })
607
+ .strict();
608
+ // M35 U1 (D1): the account field values a restore fills back: how many people the newest record an
609
+ // uninstall took holds. Each is written only for a person who still has an account and has none set
610
+ // for the plugin since, never over a value. Null when there is no record or the plugin is not installed.
611
+ export const RestoreUserFieldsPlanSchema = z
612
+ .object({
613
+ /** The group of the record filled back, so a confirm made before a newer record landed is refused. */
614
+ snapshotGroupId: z.string(),
615
+ people: z.number().int().nonnegative(),
616
+ })
617
+ .strict();
618
+ // M35 B1a (W16): the approved connections a restore writes back: how many the newest record an
619
+ // uninstall took holds. Each is written only when its two plugins are installed and it is missing.
620
+ export const RestoreConnectionsPlanSchema = z
621
+ .object({
622
+ /** The group of the record written back, so a confirm made before a newer record landed is refused. */
623
+ snapshotGroupId: z.string(),
624
+ connections: z.number().int().nonnegative(),
625
+ })
626
+ .strict();
431
627
  // 409 payload for an unconfirmed restore: nothing has been touched yet,
432
628
  // the plan is offered for the admin to review before confirming. planHash
433
629
  // (S161, S154 rider) is a stable digest of this exact plan: the confirm
@@ -439,6 +635,12 @@ export const RestorePlanEntrySchema = z.object({
439
635
  export const RestoreConfirmationRequiredSchema = z.object({
440
636
  requiresConfirmation: z.literal(true),
441
637
  plan: z.array(RestorePlanEntrySchema),
638
+ // M32 F4d (D2): optional so an answer from a server before it still reads; planHash covers it.
639
+ settings: RestoreSettingsPlanSchema.nullable().optional(),
640
+ // M35 U1 (D1): optional as `settings` is, so an answer from a server before it still reads; planHash covers it.
641
+ userFields: RestoreUserFieldsPlanSchema.nullable().optional(),
642
+ // M35 B1a: optional as userFields is; planHash covers it.
643
+ connections: RestoreConnectionsPlanSchema.nullable().optional(),
442
644
  planHash: z.string(),
443
645
  message: z.string(),
444
646
  });
@@ -447,6 +649,11 @@ export const RestoreSucceededSchema = z.object({
447
649
  // plugin had no live tracked tables to protect (restoring onto empty).
448
650
  preRestoreSnapshotGroupId: z.string().nullable(),
449
651
  restoredTables: z.array(z.string()),
652
+ // M32 F4d (D2): true when the plugin's settings values an uninstall recorded were written back.
653
+ restoredSettings: z.boolean().optional(),
654
+ // M32 F4d (D2): the group holding the safety copy of the settings values the restore replaced,
655
+ // null when there were none to keep. Not a table group: the snapshot list does not show it.
656
+ preRestoreSettingsSnapshotGroupId: z.string().nullable().optional(),
450
657
  });
451
658
  // Same DELETE-body-null convention as UninstallPluginBodySchema above: an
452
659
  // absent POST body lands as `null` (not `undefined`) once Fastify's
@@ -461,8 +668,38 @@ export const RestoreBodySchema = z
461
668
  .object({
462
669
  confirmRestore: z.boolean().optional(),
463
670
  planHash: z.string().optional(),
671
+ source: z.enum(RESTORE_SOURCES).optional(),
464
672
  })
465
673
  .nullish();
674
+ // M33 K13 (Shop 4.1 C6, Forms 2.11 C2, consolidation 3.8): deleting one snapshot group of a plugin,
675
+ // every row of it: the tables, the settings values and the data type record an uninstall wrote into
676
+ // the group. Irreversible, so a session only (a key is refused 403), holding plugins.delete, and in
677
+ // two steps like the restore: without `confirmDelete: true` the route answers 409 with what the
678
+ // delete would remove and touches nothing. Never another plugin's rows.
679
+ export const SnapshotGroupParamsSchema = PluginIdParamsSchema.extend({
680
+ snapshotGroupId: z.string().uuid(),
681
+ });
682
+ export const DeleteSnapshotGroupBodySchema = z
683
+ .object({ confirmDelete: z.boolean().optional() })
684
+ .strict()
685
+ .nullish();
686
+ export const SnapshotGroupDeleteConfirmationSchema = z.object({
687
+ requiresConfirmation: z.literal(true),
688
+ snapshotGroupId: z.string(),
689
+ takenAt: z.string(),
690
+ tableNames: z.array(z.string()),
691
+ settings: z.boolean().describe("Whether the group holds the plugin's settings values an uninstall recorded."),
692
+ dataTypes: z.boolean().describe("Whether the group holds the data type record an uninstall wrote."),
693
+ userFields: z.boolean().describe("Whether the group holds the account field values an uninstall recorded."),
694
+ message: z.string(),
695
+ });
696
+ export const SnapshotGroupDeletedSchema = z.object({
697
+ snapshotGroupId: z.string(),
698
+ removedTables: z.array(z.string()),
699
+ removedSettings: z.boolean(),
700
+ removedDataTypes: z.boolean(),
701
+ removedUserFields: z.boolean(),
702
+ });
466
703
  // S314c5 (D1, D2): restoring the data types an uninstall recorded (the row under the trigger
467
704
  // "uninstall-data-types" in the snapshot table), in the two-step form of the table restore above:
468
705
  // an unconfirmed call answers 409 with the plan and its hash, a confirmed call with that hash
@@ -537,6 +774,9 @@ export const PluginUploadResponseSchema = z.object({
537
774
  // update did not apply as shipped, or removed. Absent on a fresh install
538
775
  // and when there is nothing to say.
539
776
  warnings: InstallWarningsSchema.optional(),
777
+ // M33 Sign-in: on an update, the ids of the sign-in entries it switched off
778
+ // because the installed declarations could not be read. Absent otherwise.
779
+ signInSwitchedOff: SignInSwitchedOffSchema.optional(),
540
780
  });
541
781
  /** S274c: the upload's confirmation travels as a query flag because the
542
782
  * route reads only the multipart file part. */
@@ -558,6 +798,26 @@ export const PluginRollbackIncompleteSchema = z.object({
558
798
  message: z.string(),
559
799
  rollbackFailures: z.number().int().positive(),
560
800
  });
801
+ /** M33 Sign-in: the 409 or 422 an update answers when it failed after switching sign-in entries off
802
+ * (the installed version's sign-in declarations could not be read, so it switched them off before
803
+ * its first write, and that switch-off stands). The refusal's message, the rollback count when a
804
+ * rollback step failed, and the ids switched off (1 to 3, each 1 to 40 characters), which the
805
+ * owner switches on again in Server settings, Sign-in. `signInSwitchedOff` is required, so the
806
+ * schema matches only such an answer: first in each route's union. */
807
+ export const PluginUpdateRefusedSchema = z.object({
808
+ message: z.string(),
809
+ rollbackFailures: z.number().int().positive().optional(),
810
+ signInSwitchedOff: SignInSwitchedOffSchema,
811
+ });
812
+ /** M35 C4a and C4b (design D13, D18): the 409 an update answers when it changes the shape of a declared rich text item
813
+ * (`rich_text_item_shape_changed`: pages may hold the item in its old shape) or whether one is editorial
814
+ * (`rich_text_item_editorial_changed`: stored items keep the old flag). The update is refused before any write; the
815
+ * code names the refusal and `richTextItems` the item names it concerns. */
816
+ export const PluginRichTextShapeRefusedSchema = z.object({
817
+ message: z.string(),
818
+ code: z.enum(["rich_text_item_shape_changed", "rich_text_item_editorial_changed"]),
819
+ richTextItems: z.array(z.string()).max(RICH_TEXT_NODES_PER_PLUGIN_MAX),
820
+ });
561
821
  /** S274c: the 409 an upload over a verified plugin answers before it stores
562
822
  * anything, until the retry carries confirmTrustDowngrade=true. */
563
823
  export const TrustDowngradeConfirmationSchema = z.object({
@@ -578,7 +838,31 @@ export const DataTypeFieldBlockerSchema = z.object({
578
838
  kind: z.enum(["page", "element", "media"]),
579
839
  fields: z.array(z.object({ id: z.string(), name: z.string(), dataType: z.string() })),
580
840
  });
841
+ // M32 I5b (E2): one of the plugin's data types and the core Groups and lists that hold it (as a
842
+ // sub-field type or a list's item type). Holders refuse an uninstall, never a switch-off.
843
+ export const DataTypeHolderSchema = z.object({
844
+ dataTypeId: z.string(),
845
+ dataType: z.string(),
846
+ holders: z.array(z.object({ id: z.string(), name: z.string() })),
847
+ });
581
848
  export const PluginDataTypesInUseSchema = z.object({
582
849
  message: z.string(),
583
850
  blockedByFields: z.array(DataTypeFieldBlockerSchema),
851
+ /** M32 I5b (E2): sent by an uninstall only, and only when a Group or list holds a data type. */
852
+ heldByDataTypes: z.array(DataTypeHolderSchema).optional(),
853
+ });
854
+ // M32 F4 (D9): the 409 of a switch-off or an uninstall refused while the plugin's providers hold
855
+ // data: `chosen` is each kind whose current choice is one of its providers (choose another first),
856
+ // `storedFiles` the files its media stores keep. Nothing was changed.
857
+ export const PluginProviderInUseSchema = z.object({
858
+ error: z.literal("provider_in_use"),
859
+ message: z.string(),
860
+ chosen: z.array(z.enum(PROVIDER_KINDS)),
861
+ storedFiles: z.number().int().nonnegative(),
862
+ /** M32 F4b (D41): the ids of the plugin's sign-in providers that are switched on (switch them off in Server settings first). */
863
+ signIn: z.array(z.string()),
864
+ /** M35 U1 (W51): the plugins whose own form protection choice names one of its providers (choose another for them first). */
865
+ callers: z.array(z.string()).optional(),
866
+ /** M35 U3a (D10): the ids of the plugin's sign-in steps that are switched on. */
867
+ signInSteps: z.array(z.string()).optional(),
584
868
  });
@@ -2,7 +2,7 @@ import type { PluginLabel } from "./plugin-labels.js";
2
2
  /** The contribution kinds that sit behind a named action. The SDK classifies
3
3
  * these on its CONTRIBUTION_RULES table; its test pins that table to this
4
4
  * list, so the two cannot drift apart silently. */
5
- export declare const ACTION_GATED_CONTRIBUTION_KEYS: readonly ["adminSections", "railEntries", "dashboardWidgets", "apiRoutes"];
5
+ export declare const ACTION_GATED_CONTRIBUTION_KEYS: readonly ["adminSections", "railEntries", "dashboardWidgets", "apiRoutes", "editorPanels", "treeActions", "contentColumns", "treeBadges", "listFilters", "bulkActions", "adminSlots"];
6
6
  /** S293 (S283's decision, 2026-10-13-s293-the-wizard-installed-design.md 3.9):
7
7
  * the built-in rights an offered role may grant beside the plugin's own
8
8
  * actions: the read right of each built-in section a rail entry may join
@@ -10,6 +10,21 @@ export declare const ACTION_GATED_CONTRIBUTION_KEYS: readonly ["adminSections",
10
10
  * accepted offer can open the section its plugin's screen sits in. A write
11
11
  * right is never offerable. */
12
12
  export declare const OFFERABLE_BUILT_IN_ACTIONS: readonly ["content.read", "media.read", "settings.read", "users.read"];
13
+ /** M33 K29 (SEO 2.16 C7): the core actions a plugin's own action may be offered to. An action that
14
+ * declares `offerTo` is offered, at install or later from the installed plugins, to every role
15
+ * that holds that core action then, the administrator left out (it holds every action already).
16
+ * One target per action, from this fixed list. */
17
+ export declare const PLUGIN_ACTION_OFFER_TARGETS: readonly ["content.read", "content.update", "content.publish", "media.read"];
18
+ export type PluginActionOfferTarget = (typeof PLUGIN_ACTION_OFFER_TARGETS)[number];
19
+ /**
20
+ * M33 K29: whether an offer's box starts ticked, derived from the declarations and never declared
21
+ * (operator question 5 of the SEO design). Ticked when only editor panels, admin sections (their
22
+ * rail entries included), rail entries, dashboard widgets, content list columns, tree badges, list
23
+ * filters, admin slots (M35 C2) and `GET` routes name the action; unticked when a route of any
24
+ * other method names it, or a tree action or a bulk action does (each acts on pages).
25
+ * Read defensively, as deriveCapabilities reads a manifest.
26
+ */
27
+ export declare function actionOfferTicked(contributions: unknown, actionId: string): boolean;
13
28
  export interface ActionDeclarationIssue {
14
29
  path: (string | number)[];
15
30
  message: string;
@@ -19,6 +34,7 @@ export interface ActionDeclarationInput {
19
34
  actions?: ReadonlyArray<{
20
35
  id: string;
21
36
  label: PluginLabel;
37
+ offerTo?: string;
22
38
  }>;
23
39
  roles?: ReadonlyArray<{
24
40
  id: string;
@@ -27,4 +43,10 @@ export interface ActionDeclarationInput {
27
43
  }>;
28
44
  contributions?: unknown;
29
45
  }
46
+ /** M35 C3 (W28): the contribution keys whose entries mount a plugin view, each gated by the action it names.
47
+ * An `apiRoutes` action opens no view, and content columns, tree badges and list filters draw host markup
48
+ * from data, so none of them admits a reader of the plugin's view settings. */
49
+ export declare const VIEW_BEARING_ACTION_KEYS: readonly ["adminSections", "railEntries", "dashboardWidgets", "editorPanels", "treeActions", "bulkActions", "adminSlots"];
50
+ /** M35 C3 (W28): the actions that open one of the plugin's views (a section's rail entries included). Read defensively. */
51
+ export declare function viewActionsOf(contributions: unknown): string[];
30
52
  export declare function checkActionDeclarations(manifest: ActionDeclarationInput): ActionDeclarationIssue[];
@@ -10,7 +10,11 @@ import { isPluginActionFor } from "./action.schema.js";
10
10
  /** The contribution kinds that sit behind a named action. The SDK classifies
11
11
  * these on its CONTRIBUTION_RULES table; its test pins that table to this
12
12
  * list, so the two cannot drift apart silently. */
13
- export const ACTION_GATED_CONTRIBUTION_KEYS = ["adminSections", "railEntries", "dashboardWidgets", "apiRoutes"];
13
+ export const ACTION_GATED_CONTRIBUTION_KEYS = [
14
+ "adminSections", "railEntries", "dashboardWidgets", "apiRoutes", "editorPanels", "treeActions",
15
+ // M35 C2 (W5, W26): each names the action a person must hold to see it.
16
+ "contentColumns", "treeBadges", "listFilters", "bulkActions", "adminSlots",
17
+ ];
14
18
  /** S293 (S283's decision, 2026-10-13-s293-the-wizard-installed-design.md 3.9):
15
19
  * the built-in rights an offered role may grant beside the plugin's own
16
20
  * actions: the read right of each built-in section a rail entry may join
@@ -20,12 +24,47 @@ export const ACTION_GATED_CONTRIBUTION_KEYS = ["adminSections", "railEntries", "
20
24
  export const OFFERABLE_BUILT_IN_ACTIONS = ["content.read", "media.read", "settings.read", "users.read"];
21
25
  const OFFERABLE = new Set(OFFERABLE_BUILT_IN_ACTIONS);
22
26
  const OFFERABLE_LIST = `${OFFERABLE_BUILT_IN_ACTIONS.slice(0, -1).map((action) => `"${action}"`).join(", ")} or "${OFFERABLE_BUILT_IN_ACTIONS[OFFERABLE_BUILT_IN_ACTIONS.length - 1]}"`;
23
- function referencedActions(contributions) {
27
+ /** M33 K29 (SEO 2.16 C7): the core actions a plugin's own action may be offered to. An action that
28
+ * declares `offerTo` is offered, at install or later from the installed plugins, to every role
29
+ * that holds that core action then, the administrator left out (it holds every action already).
30
+ * One target per action, from this fixed list. */
31
+ export const PLUGIN_ACTION_OFFER_TARGETS = ["content.read", "content.update", "content.publish", "media.read"];
32
+ /** The gated kinds whose naming an action keeps its offer ticked: each shows something (a panel,
33
+ * a section and its rail, a rail entry, a widget, and since M35 C2 a content list column, a tree
34
+ * badge, a list filter and a panel in a core screen) and changes nothing itself. A GET route is
35
+ * the one route kind beside them. */
36
+ const SHOWING_KINDS = new Set(["adminSections", "railEntries", "dashboardWidgets", "editorPanels", "contentColumns", "treeBadges", "listFilters", "adminSlots"]);
37
+ /**
38
+ * M33 K29: whether an offer's box starts ticked, derived from the declarations and never declared
39
+ * (operator question 5 of the SEO design). Ticked when only editor panels, admin sections (their
40
+ * rail entries included), rail entries, dashboard widgets, content list columns, tree badges, list
41
+ * filters, admin slots (M35 C2) and `GET` routes name the action; unticked when a route of any
42
+ * other method names it, or a tree action or a bulk action does (each acts on pages).
43
+ * Read defensively, as deriveCapabilities reads a manifest.
44
+ */
45
+ export function actionOfferTicked(contributions, actionId) {
46
+ if (!contributions || typeof contributions !== "object")
47
+ return true;
48
+ const record = contributions;
49
+ for (const key of ACTION_GATED_CONTRIBUTION_KEYS) {
50
+ const entries = record[key];
51
+ if (!Array.isArray(entries))
52
+ continue;
53
+ for (const entry of entries) {
54
+ if (entry?.action !== actionId)
55
+ continue;
56
+ if (key === "apiRoutes" ? entry.method !== "GET" : !SHOWING_KINDS.has(key))
57
+ return false;
58
+ }
59
+ }
60
+ return true;
61
+ }
62
+ function referencedActions(contributions, keys = ACTION_GATED_CONTRIBUTION_KEYS) {
24
63
  const referenced = new Set();
25
64
  if (!contributions || typeof contributions !== "object")
26
65
  return referenced;
27
66
  const record = contributions;
28
- for (const key of ACTION_GATED_CONTRIBUTION_KEYS) {
67
+ for (const key of keys) {
29
68
  const entries = record[key];
30
69
  if (!Array.isArray(entries))
31
70
  continue;
@@ -46,8 +85,27 @@ function referencedActions(contributions) {
46
85
  }
47
86
  }
48
87
  }
88
+ // M35 C4b (design D16): a rich text button view names its action inside richTextExtensions.buttons[].does, not as a
89
+ // top-level `action`, so it is read here for both the declared-action rule and the view actions.
90
+ const rich = record.richTextExtensions;
91
+ const buttons = rich !== null && typeof rich === "object" ? rich.buttons : undefined;
92
+ if (Array.isArray(buttons)) {
93
+ for (const button of buttons) {
94
+ const action = button?.does?.action;
95
+ if (typeof action === "string")
96
+ referenced.add(action);
97
+ }
98
+ }
49
99
  return referenced;
50
100
  }
101
+ /** M35 C3 (W28): the contribution keys whose entries mount a plugin view, each gated by the action it names.
102
+ * An `apiRoutes` action opens no view, and content columns, tree badges and list filters draw host markup
103
+ * from data, so none of them admits a reader of the plugin's view settings. */
104
+ export const VIEW_BEARING_ACTION_KEYS = ["adminSections", "railEntries", "dashboardWidgets", "editorPanels", "treeActions", "bulkActions", "adminSlots"];
105
+ /** M35 C3 (W28): the actions that open one of the plugin's views (a section's rail entries included). Read defensively. */
106
+ export function viewActionsOf(contributions) {
107
+ return [...referencedActions(contributions, VIEW_BEARING_ACTION_KEYS)];
108
+ }
51
109
  export function checkActionDeclarations(manifest) {
52
110
  const issues = [];
53
111
  const referenced = referencedActions(manifest.contributions);