@kardalum/plugin-sdk 0.20.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 (323) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/admin-section-registry.d.ts +33 -1
  3. package/dist/admin-section-registry.js +67 -0
  4. package/dist/capabilities.js +46 -1
  5. package/dist/consent-entry.d.ts +11 -0
  6. package/dist/consent-entry.js +18 -0
  7. package/dist/content-library.d.ts +17 -0
  8. package/dist/content-list-extensions.d.ts +50 -0
  9. package/dist/content-list-extensions.js +11 -0
  10. package/dist/content-picker/page-picker-sheet.d.ts +2 -0
  11. package/dist/content-picker/page-picker-sheet.js +1 -1
  12. package/dist/content-picker/page-picker.d.ts +18 -0
  13. package/dist/content-picker/page-picker.js +20 -0
  14. package/dist/datatype-validation.js +10 -2
  15. package/dist/datatypes-entry.d.ts +1 -0
  16. package/dist/datatypes-entry.js +2 -0
  17. package/dist/entitlement-types.d.ts +18 -1
  18. package/dist/host-entry.d.ts +7 -1
  19. package/dist/host-entry.js +14 -1
  20. package/dist/index.d.ts +35 -7
  21. package/dist/index.js +46 -5
  22. package/dist/mail.d.ts +6 -2
  23. package/dist/manifest-entry.d.ts +22 -4
  24. package/dist/manifest-entry.js +25 -1
  25. package/dist/manifest-schema.d.ts +570 -31
  26. package/dist/manifest-schema.js +240 -12
  27. package/dist/manifest.d.ts +757 -32
  28. package/dist/manifest.js +8 -4
  29. package/dist/plugin-context.d.ts +47 -0
  30. package/dist/plugin-context.js +27 -0
  31. package/dist/plugin-permissions.d.ts +18 -0
  32. package/dist/plugin-permissions.js +25 -0
  33. package/dist/plugin-screen-context.d.ts +152 -11
  34. package/dist/plugin-screen-context.js +30 -0
  35. package/dist/providers.d.ts +47 -2
  36. package/dist/render-page.d.ts +15 -0
  37. package/dist/render-page.js +20 -0
  38. package/dist/richtext/block-panel.d.ts +12 -1
  39. package/dist/richtext/block-panel.js +27 -21
  40. package/dist/richtext/button-view.d.ts +11 -0
  41. package/dist/richtext/button-view.js +45 -0
  42. package/dist/richtext/content-guard.d.ts +4 -0
  43. package/dist/richtext/content-guard.js +27 -0
  44. package/dist/richtext/editor-handle.d.ts +34 -0
  45. package/dist/richtext/editor-handle.js +225 -0
  46. package/dist/richtext/extensions.d.ts +6 -0
  47. package/dist/richtext/extensions.js +16 -0
  48. package/dist/richtext/insert-menu.d.ts +6 -1
  49. package/dist/richtext/insert-menu.js +38 -18
  50. package/dist/richtext/item-attributes.d.ts +6 -0
  51. package/dist/richtext/item-attributes.js +19 -0
  52. package/dist/richtext/item-panel.d.ts +25 -0
  53. package/dist/richtext/item-panel.js +118 -0
  54. package/dist/richtext/item-view.d.ts +58 -0
  55. package/dist/richtext/item-view.js +172 -0
  56. package/dist/richtext/mark-form.d.ts +10 -0
  57. package/dist/richtext/mark-form.js +38 -0
  58. package/dist/richtext/paste-choice.d.ts +9 -0
  59. package/dist/richtext/paste-choice.js +13 -0
  60. package/dist/richtext/plugin-items.d.ts +72 -0
  61. package/dist/richtext/plugin-items.js +562 -0
  62. package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
  63. package/dist/richtext/plugin-mark-tooltips.js +44 -0
  64. package/dist/richtext/plugin-toolbar.d.ts +57 -0
  65. package/dist/richtext/plugin-toolbar.js +186 -0
  66. package/dist/richtext/rich-item-icons.d.ts +5 -0
  67. package/dist/richtext/rich-item-icons.js +42 -0
  68. package/dist/richtext/rich-items.d.ts +42 -0
  69. package/dist/richtext/rich-items.js +68 -0
  70. package/dist/richtext/rich-text-view-host.d.ts +24 -0
  71. package/dist/richtext/rich-text-view-host.js +11 -0
  72. package/dist/richtext/toolbar-button.d.ts +16 -0
  73. package/dist/richtext/toolbar-button.js +9 -0
  74. package/dist/richtext/url-paste.d.ts +20 -0
  75. package/dist/richtext/url-paste.js +82 -0
  76. package/dist/richtext-html-entry.d.ts +5 -0
  77. package/dist/richtext-html-entry.js +11 -0
  78. package/dist/sdk-strings.d.ts +59 -0
  79. package/dist/sdk-strings.js +64 -0
  80. package/dist/service-contract.d.ts +17 -0
  81. package/dist/service-contract.js +39 -0
  82. package/dist/services.d.ts +114 -0
  83. package/dist/services.js +1 -0
  84. package/dist/structured-storage-types.d.ts +124 -4
  85. package/dist/tailwind.js +10 -5
  86. package/dist/template-reads.d.ts +16 -0
  87. package/dist/template-reads.js +21 -0
  88. package/dist/testing-entry.d.ts +38 -0
  89. package/dist/testing-entry.js +173 -0
  90. package/dist/text-entry.d.ts +1 -1
  91. package/dist/text-entry.js +3 -2
  92. package/dist/tokens/system-dark.css +1 -0
  93. package/dist/tokens/tailwind-theme.css +2 -0
  94. package/dist/tokens/tokens.css +4 -0
  95. package/dist/tokens/tokens.json +5 -1
  96. package/dist/uploads.d.ts +43 -0
  97. package/dist/uploads.js +1 -0
  98. package/dist/user-library.d.ts +51 -0
  99. package/dist/user-library.js +15 -0
  100. package/dist/view-helpers.d.ts +18 -0
  101. package/dist/view-helpers.js +64 -0
  102. package/dist/views/content-list-view.js +207 -8
  103. package/dist/views/content-picker-view.js +1 -1
  104. package/dist/views/rich-text-view.d.ts +2 -0
  105. package/dist/views/rich-text-view.js +182 -24
  106. package/dist/views/unreadable-rich-text.d.ts +17 -0
  107. package/dist/views/unreadable-rich-text.js +40 -0
  108. package/dist/visitors.d.ts +81 -0
  109. package/dist/visitors.js +1 -0
  110. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
  111. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
  112. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
  113. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
  114. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +127 -8
  115. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +82 -7
  116. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +5 -1
  117. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +2 -2
  118. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +7 -0
  119. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +11 -0
  120. package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +1 -1
  121. package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +18 -0
  122. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +80 -0
  123. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +41 -2
  124. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
  125. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
  126. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
  127. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
  128. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +50 -13
  129. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +19 -10
  130. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +77 -0
  131. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +37 -0
  132. package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
  133. package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
  134. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
  135. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
  136. package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
  137. package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
  138. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
  139. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
  140. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +52 -14
  141. package/node_modules/@kardalum/api-schemas/dist/index.js +53 -9
  142. package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
  143. package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
  144. package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +4 -2
  145. package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +6 -1
  146. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +178 -2
  147. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +10 -0
  148. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +3 -3
  149. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +16 -0
  150. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +4 -0
  151. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
  152. package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +7 -0
  153. package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +51 -2
  154. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
  155. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
  156. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
  157. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
  158. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +4 -2
  159. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +12 -2
  160. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
  161. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
  162. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
  163. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
  164. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
  165. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
  166. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
  167. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
  168. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
  169. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
  170. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
  171. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
  172. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +18 -0
  173. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +18 -0
  174. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +5 -2
  175. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +10 -2
  176. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +48 -1
  177. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +5 -2
  178. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +6 -4
  179. package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
  180. package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
  181. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
  182. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
  183. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +12 -0
  184. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +3 -0
  185. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +2 -0
  186. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +3 -0
  187. package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +67 -0
  188. package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +15 -0
  189. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
  190. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
  191. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +80 -15
  192. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +67 -23
  193. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +10 -3
  194. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +33 -8
  195. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +2 -1
  196. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +7 -1
  197. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +1 -1
  198. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +43 -7
  199. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +36 -5
  200. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
  201. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
  202. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
  203. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
  204. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
  205. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
  206. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
  207. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
  208. package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
  209. package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
  210. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +10 -0
  211. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +10 -1
  212. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +171 -4
  213. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +406 -42
  214. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
  215. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
  216. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
  217. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
  218. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
  219. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
  220. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
  221. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
  222. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
  223. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
  224. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
  225. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
  226. package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
  227. package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
  228. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +303 -0
  229. package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
  230. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
  231. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
  232. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +66 -1
  233. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +465 -7
  234. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +15 -118
  235. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +110 -0
  236. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
  237. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
  238. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
  239. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +9 -2
  240. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +7 -2
  241. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +26 -0
  242. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +19 -0
  243. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
  244. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
  245. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +5 -3
  246. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +3 -1
  247. package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
  248. package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
  249. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +4 -0
  250. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +28 -0
  251. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
  252. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
  253. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +14 -0
  254. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +2 -0
  255. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
  256. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
  257. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
  258. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
  259. package/node_modules/@kardalum/api-schemas/package.json +1 -0
  260. package/node_modules/@kardalum/design-tokens/dist/build-css.js +9 -1
  261. package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
  262. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +2 -0
  263. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -0
  264. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
  265. package/node_modules/@kardalum/design-tokens/dist/tokens.css +4 -0
  266. package/node_modules/@kardalum/design-tokens/dist/tokens.js +6 -0
  267. package/node_modules/@kardalum/design-tokens/dist/tokens.json +5 -1
  268. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +4 -0
  269. package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +17 -0
  270. package/node_modules/@kardalum/plugin-package/dist/build-reference.js +9 -0
  271. package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +1 -1
  272. package/node_modules/@kardalum/plugin-package/dist/capabilities.js +276 -19
  273. package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
  274. package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +23 -0
  275. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
  276. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
  277. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
  278. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
  279. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
  280. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
  281. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +21 -8
  282. package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +1 -1
  283. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +23 -10
  284. package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
  285. package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +2 -0
  286. package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +2 -0
  287. package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +30 -2
  288. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +6 -2
  289. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
  290. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
  291. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +2 -0
  292. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +24 -6
  293. package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +15 -0
  294. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
  295. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
  296. package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +1 -1
  297. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +14 -4
  298. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
  299. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
  300. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
  301. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
  302. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +44 -11
  303. package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +7 -0
  304. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
  305. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
  306. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
  307. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
  308. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -0
  309. package/node_modules/@kardalum/plugin-package/dist/index.js +5 -0
  310. package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
  311. package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
  312. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
  313. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
  314. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
  315. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
  316. package/node_modules/@kardalum/plugin-package/package.json +4 -0
  317. package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
  318. package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
  319. package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
  320. package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
  321. package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
  322. package/node_modules/@kardalum/ui/dist/index.js +2 -0
  323. package/package.json +15 -3
@@ -256,6 +256,11 @@ export declare const InstallAnswersSchema: z.ZodObject<{
256
256
  sampleContent: z.ZodOptional<z.ZodBoolean>;
257
257
  roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
258
258
  grants: z.ZodOptional<z.ZodArray<z.ZodString>>;
259
+ connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
260
+ consumer: z.ZodString;
261
+ provider: z.ZodString;
262
+ contract: z.ZodString;
263
+ }, z.core.$strict>>>;
259
264
  options: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>>, unknown>>;
260
265
  settings: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
261
266
  secret: z.ZodString;
@@ -566,6 +571,7 @@ export declare const InstallInterfaceSchema: z.ZodObject<{
566
571
  default: z.ZodOptional<z.ZodString>;
567
572
  maxLength: z.ZodOptional<z.ZodNumber>;
568
573
  multiline: z.ZodOptional<z.ZodBoolean>;
574
+ inViews: z.ZodOptional<z.ZodBoolean>;
569
575
  id: z.ZodString;
570
576
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
571
577
  en: z.ZodString;
@@ -580,6 +586,7 @@ export declare const InstallInterfaceSchema: z.ZodObject<{
580
586
  min: z.ZodOptional<z.ZodNumber>;
581
587
  max: z.ZodOptional<z.ZodNumber>;
582
588
  integer: z.ZodOptional<z.ZodBoolean>;
589
+ inViews: z.ZodOptional<z.ZodBoolean>;
583
590
  id: z.ZodString;
584
591
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
585
592
  en: z.ZodString;
@@ -591,6 +598,7 @@ export declare const InstallInterfaceSchema: z.ZodObject<{
591
598
  }, z.core.$strict>, z.ZodObject<{
592
599
  type: z.ZodLiteral<"onOff">;
593
600
  default: z.ZodOptional<z.ZodBoolean>;
601
+ inViews: z.ZodOptional<z.ZodBoolean>;
594
602
  id: z.ZodString;
595
603
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
596
604
  en: z.ZodString;
@@ -608,6 +616,7 @@ export declare const InstallInterfaceSchema: z.ZodObject<{
608
616
  en: z.ZodString;
609
617
  }, z.core.$catchall<z.ZodString>>, unknown>]>;
610
618
  }, z.core.$strict>>;
619
+ inViews: z.ZodOptional<z.ZodBoolean>;
611
620
  id: z.ZodString;
612
621
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
613
622
  en: z.ZodString;
@@ -628,6 +637,32 @@ export declare const InstallInterfaceSchema: z.ZodObject<{
628
637
  }, z.core.$catchall<z.ZodString>>, unknown>]>>;
629
638
  askAtInstall: z.ZodOptional<z.ZodBoolean>;
630
639
  }, z.core.$strict>], "type">>>;
640
+ services: z.ZodOptional<z.ZodObject<{
641
+ contracts: z.ZodArray<z.ZodObject<{
642
+ name: z.ZodString;
643
+ version: z.ZodString;
644
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
645
+ readsPersonal: z.ZodBoolean;
646
+ personalOutput: z.ZodArray<z.ZodString>;
647
+ sendsPersonal: z.ZodBoolean;
648
+ writes: z.ZodBoolean;
649
+ }, z.core.$strip>>;
650
+ offers: z.ZodArray<z.ZodObject<{
651
+ contract: z.ZodString;
652
+ version: z.ZodString;
653
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
654
+ }, z.core.$strip>>;
655
+ uses: z.ZodArray<z.ZodObject<{
656
+ contract: z.ZodString;
657
+ range: z.ZodString;
658
+ optional: z.ZodBoolean;
659
+ }, z.core.$strip>>;
660
+ events: z.ZodArray<z.ZodObject<{
661
+ name: z.ZodString;
662
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
663
+ }, z.core.$strip>>;
664
+ listens: z.ZodArray<z.ZodString>;
665
+ }, z.core.$strip>>;
631
666
  }, z.core.$strict>;
632
667
  export type InstallInterface = z.infer<typeof InstallInterfaceSchema>;
633
668
  /** InstallInterfaceSchema as the listing wire carries it, from the
@@ -741,6 +776,7 @@ export declare const InstallInterfaceWireSchema: z.ZodObject<{
741
776
  default: z.ZodOptional<z.ZodString>;
742
777
  maxLength: z.ZodOptional<z.ZodNumber>;
743
778
  multiline: z.ZodOptional<z.ZodBoolean>;
779
+ inViews: z.ZodOptional<z.ZodBoolean>;
744
780
  id: z.ZodString;
745
781
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
746
782
  en: z.ZodString;
@@ -755,6 +791,7 @@ export declare const InstallInterfaceWireSchema: z.ZodObject<{
755
791
  min: z.ZodOptional<z.ZodNumber>;
756
792
  max: z.ZodOptional<z.ZodNumber>;
757
793
  integer: z.ZodOptional<z.ZodBoolean>;
794
+ inViews: z.ZodOptional<z.ZodBoolean>;
758
795
  id: z.ZodString;
759
796
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
760
797
  en: z.ZodString;
@@ -766,6 +803,7 @@ export declare const InstallInterfaceWireSchema: z.ZodObject<{
766
803
  }, z.core.$strict>, z.ZodObject<{
767
804
  type: z.ZodLiteral<"onOff">;
768
805
  default: z.ZodOptional<z.ZodBoolean>;
806
+ inViews: z.ZodOptional<z.ZodBoolean>;
769
807
  id: z.ZodString;
770
808
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
771
809
  en: z.ZodString;
@@ -783,6 +821,7 @@ export declare const InstallInterfaceWireSchema: z.ZodObject<{
783
821
  en: z.ZodString;
784
822
  }, z.core.$catchall<z.ZodString>>, unknown>]>;
785
823
  }, z.core.$strict>>;
824
+ inViews: z.ZodOptional<z.ZodBoolean>;
786
825
  id: z.ZodString;
787
826
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
788
827
  en: z.ZodString;
@@ -803,12 +842,40 @@ export declare const InstallInterfaceWireSchema: z.ZodObject<{
803
842
  }, z.core.$catchall<z.ZodString>>, unknown>]>>;
804
843
  askAtInstall: z.ZodOptional<z.ZodBoolean>;
805
844
  }, z.core.$strict>], "type">>>;
845
+ services: z.ZodOptional<z.ZodObject<{
846
+ contracts: z.ZodArray<z.ZodObject<{
847
+ name: z.ZodString;
848
+ version: z.ZodString;
849
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
850
+ readsPersonal: z.ZodBoolean;
851
+ personalOutput: z.ZodArray<z.ZodString>;
852
+ sendsPersonal: z.ZodBoolean;
853
+ writes: z.ZodBoolean;
854
+ }, z.core.$strip>>;
855
+ offers: z.ZodArray<z.ZodObject<{
856
+ contract: z.ZodString;
857
+ version: z.ZodString;
858
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
859
+ }, z.core.$strip>>;
860
+ uses: z.ZodArray<z.ZodObject<{
861
+ contract: z.ZodString;
862
+ range: z.ZodString;
863
+ optional: z.ZodBoolean;
864
+ }, z.core.$strip>>;
865
+ events: z.ZodArray<z.ZodObject<{
866
+ name: z.ZodString;
867
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
868
+ }, z.core.$strip>>;
869
+ listens: z.ZodArray<z.ZodString>;
870
+ }, z.core.$strip>>;
806
871
  }, z.core.$strip>;
807
872
  export type InstallInterfaceWire = z.infer<typeof InstallInterfaceWireSchema>;
808
873
  /** What installInterfaceFor reads: the live manifest or manifest.json's
809
874
  * redacted form (where migrations are ids). The consent facts are read
810
875
  * defensively, as deriveCapabilities reads them. */
811
876
  export interface InstallInterfaceManifest {
877
+ /** M35 B1a: read for the services summary (readServiceDeclarations). */
878
+ id?: string;
812
879
  install?: PluginInstallDeclaration;
813
880
  roles?: ReadonlyArray<{
814
881
  id: string;
@@ -7,6 +7,8 @@ import { LABEL_KEY_MAX_LENGTH, LABEL_MAX_LANGUAGES, PluginLabelSchema, labelMapS
7
7
  import { RoleIdSchema } from "./role.schema.js";
8
8
  import { PLUGIN_SECRET_VALUE_MAX_BYTES, fitsUtf8 } from "./plugin-secrets.js";
9
9
  import { PLUGIN_SETTINGS_FIELDS_MAX, PLUGIN_SETTING_TEXT_MAX, PluginSettingFieldSchema, declaredSettingsFieldsOf, isPluginSettingId, pluginSettingsValuesSchema, } from "./plugin-settings.js";
10
+ import { INSTALL_MAX_CONNECTION_ANSWERS, ServiceConnectionKeySchema } from "./plugin-service-connections.js";
11
+ import { ServiceSummarySchema, declaresServices, readServiceDeclarations, serviceSummaryOf } from "./plugin-service-declarations.js";
10
12
  // S292 (2026-10-13-s292-what-the-wizard-may-ask-design.md): what a plugin's
11
13
  // install asks, declared as plain data in the manifest's `install`, so the
12
14
  // install screen, a script and the CLI can all ask it and answer it before
@@ -209,6 +211,12 @@ export const InstallAnswersSchema = z
209
211
  .max(INSTALL_MAX_GRANT_ANSWERS, { message: `an answers object accepts at most ${INSTALL_MAX_GRANT_ANSWERS} action offers` })
210
212
  .meta({ example: ["com.example.words.panel.view"] })
211
213
  .optional(),
214
+ // M35 B1a (W16): the connections the person ticked (design 4.6). Absent, the install grants each
215
+ // line's default; given, it grants the required lines that need no tick and exactly the ones named.
216
+ connections: z
217
+ .array(ServiceConnectionKeySchema)
218
+ .max(INSTALL_MAX_CONNECTION_ANSWERS, { message: `an answers object names at most ${INSTALL_MAX_CONNECTION_ANSWERS} connections` })
219
+ .optional(),
212
220
  options: z
213
221
  .preprocess(refuseOwnProtoKey, z
214
222
  .record(InstallAnswerKeySchema, InstallAnswerValueSchema, {
@@ -621,6 +629,8 @@ export const InstallInterfaceSchema = z
621
629
  steps: z.array(InstallStepSchema),
622
630
  /** M32 F4d (D5): the settings fields asked at install, as declared; absent when there are none. */
623
631
  settings: z.array(PluginSettingFieldSchema).optional(),
632
+ /** M35 B1a: what the plugin offers, uses, raises and hears; absent when it declares none. */
633
+ services: ServiceSummarySchema.optional(),
624
634
  })
625
635
  .strict();
626
636
  /** InstallInterfaceSchema as the listing wire carries it, from the
@@ -643,6 +653,8 @@ export const InstallInterfaceWireSchema = z.object({
643
653
  offers: z.array(z.object(actionOfferShape)).optional(),
644
654
  steps: z.array(InstallStepSchema),
645
655
  settings: z.array(PluginSettingFieldSchema).optional(),
656
+ /** M35 B1a: what the plugin offers, uses, raises and hears; absent when it declares none. */
657
+ services: ServiceSummarySchema.optional(),
646
658
  });
647
659
  function asRecord(value) {
648
660
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
@@ -686,6 +698,8 @@ export function installInterfaceFor(manifest, shipped) {
686
698
  consent.push({ id: "structuredStorage", details: [] });
687
699
  const asked = askedAtInstallFieldsOf(manifest.contributions);
688
700
  const offers = (manifest.actions ?? []).flatMap(({ id, label, offerTo }) => offerTo === undefined ? [] : [{ action: id, label, target: offerTo, default: actionOfferTicked(manifest.contributions, id) }]);
701
+ // M35 B1a: the services part, read as the server reads it, so the screen and the install agree.
702
+ const services = readServiceDeclarations(manifest);
689
703
  return {
690
704
  consent,
691
705
  sampleContent: shipped.sampleContent
@@ -698,5 +712,6 @@ export function installInterfaceFor(manifest, shipped) {
698
712
  steps: manifest.install ? JSON.parse(JSON.stringify(manifest.install.steps)) : [],
699
713
  // M32 F4d (D5): parsed copies, so the caller may change what it is handed.
700
714
  ...(asked.length > 0 ? { settings: asked } : {}),
715
+ ...(declaresServices(services) ? { services: serviceSummaryOf(services) } : {}),
701
716
  };
702
717
  }
@@ -0,0 +1,138 @@
1
+ import { z } from "zod";
2
+ export declare const KEEP_PREVIEW_PAGE_SIZE = 50;
3
+ /** Sample pages an install may record is already bounded by SAMPLE_CONTENT_MAX_BYTES; the explicit list sent with an uninstall is capped here. */
4
+ export declare const UNINSTALL_SAMPLE_PAGES_MAX = 500;
5
+ /** The keep plan reads every document type of the site, a page of 100 at a time, to find the types
6
+ * whose default is one of the plugin's templates; past this many it stops and keeps everything. */
7
+ export declare const UNINSTALL_DOCUMENT_TYPES_SCANNED_MAX = 5000;
8
+ export declare const KeptPartStateSchema: z.ZodEnum<{
9
+ on: "on";
10
+ uninstalled: "uninstalled";
11
+ off: "off";
12
+ }>;
13
+ export type KeptPartState = z.infer<typeof KeptPartStateSchema>;
14
+ export declare const KeptTemplateReasonSchema: z.ZodEnum<{
15
+ used: "used";
16
+ edited: "edited";
17
+ referenced: "referenced";
18
+ }>;
19
+ export type KeptTemplateReason = z.infer<typeof KeptTemplateReasonSchema>;
20
+ /** How far a delete or a preview counts a type's trashed pages; past it the answer says "at least". */
21
+ export declare const DOCUMENT_TYPE_TRASHED_COUNT_LIMIT = 1000;
22
+ /** GET /api/manage/v1/plugins/:pluginId/uninstall-preview: what an uninstall keeps and what goes, a
23
+ * part at a time, a pure read that never runs plugin code. */
24
+ export declare const UNINSTALL_PREVIEW_PARTS: readonly ["summary", "samplePages", "documentTypes", "templates"];
25
+ export declare const UninstallPreviewQuerySchema: z.ZodObject<{
26
+ part: z.ZodEnum<{
27
+ summary: "summary";
28
+ documentTypes: "documentTypes";
29
+ templates: "templates";
30
+ samplePages: "samplePages";
31
+ }>;
32
+ cursor: z.ZodOptional<z.ZodString>;
33
+ }, z.core.$strip>;
34
+ export type UninstallPreviewQuery = z.infer<typeof UninstallPreviewQuerySchema>;
35
+ export declare const UninstallPreviewSchema: z.ZodObject<{
36
+ summary: z.ZodOptional<z.ZodObject<{
37
+ pageCount: z.ZodNumber;
38
+ documentTypesKept: z.ZodNumber;
39
+ templatesKept: z.ZodNumber;
40
+ templatesLeaving: z.ZodNumber;
41
+ assetsKept: z.ZodBoolean;
42
+ dataSnapshotted: z.ZodBoolean;
43
+ scanStopped: z.ZodBoolean;
44
+ }, z.core.$strip>>;
45
+ samplePages: z.ZodOptional<z.ZodObject<{
46
+ items: z.ZodArray<z.ZodObject<{
47
+ id: z.ZodString;
48
+ title: z.ZodString;
49
+ path: z.ZodString;
50
+ edited: z.ZodBoolean;
51
+ }, z.core.$strip>>;
52
+ nextCursor: z.ZodNullable<z.ZodString>;
53
+ }, z.core.$strip>>;
54
+ documentTypes: z.ZodOptional<z.ZodObject<{
55
+ items: z.ZodArray<z.ZodObject<{
56
+ id: z.ZodString;
57
+ name: z.ZodString;
58
+ livePages: z.ZodNumber;
59
+ trashedPages: z.ZodNumber;
60
+ trashedCapped: z.ZodBoolean;
61
+ stays: z.ZodBoolean;
62
+ }, z.core.$strip>>;
63
+ nextCursor: z.ZodNullable<z.ZodString>;
64
+ }, z.core.$strip>>;
65
+ templates: z.ZodOptional<z.ZodObject<{
66
+ items: z.ZodArray<z.ZodObject<{
67
+ id: z.ZodString;
68
+ name: z.ZodString;
69
+ kind: z.ZodString;
70
+ stays: z.ZodBoolean;
71
+ reason: z.ZodNullable<z.ZodEnum<{
72
+ used: "used";
73
+ edited: "edited";
74
+ referenced: "referenced";
75
+ }>>;
76
+ }, z.core.$strip>>;
77
+ nextCursor: z.ZodNullable<z.ZodString>;
78
+ }, z.core.$strip>>;
79
+ }, z.core.$strip>;
80
+ export type UninstallPreview = z.infer<typeof UninstallPreviewSchema>;
81
+ /** GET /api/manage/v1/plugins/:pluginId/switch-off-preview: what a switch-off stops, and the
82
+ * published pages whose template loses a dynamic part (a tag or filter of the plugin writes
83
+ * nothing while it is off). Pages keep displaying; nothing is deleted. */
84
+ export declare const SwitchOffPreviewQuerySchema: z.ZodObject<{
85
+ part: z.ZodEnum<{
86
+ pages: "pages";
87
+ summary: "summary";
88
+ }>;
89
+ cursor: z.ZodOptional<z.ZodString>;
90
+ }, z.core.$strip>;
91
+ export type SwitchOffPreviewQuery = z.infer<typeof SwitchOffPreviewQuerySchema>;
92
+ export declare const SwitchOffPreviewSchema: z.ZodObject<{
93
+ summary: z.ZodOptional<z.ZodObject<{
94
+ stops: z.ZodObject<{
95
+ adminScreens: z.ZodNumber;
96
+ apiRoutes: z.ZodNumber;
97
+ siteRoutes: z.ZodNumber;
98
+ scheduledTasks: z.ZodNumber;
99
+ hooks: z.ZodNumber;
100
+ templateTagsAndFilters: z.ZodNumber;
101
+ fieldEditors: z.ZodNumber;
102
+ }, z.core.$strip>;
103
+ refusal: z.ZodNullable<z.ZodObject<{
104
+ code: z.ZodString;
105
+ message: z.ZodString;
106
+ }, z.core.$strip>>;
107
+ templatesWithDynamicParts: z.ZodArray<z.ZodObject<{
108
+ id: z.ZodString;
109
+ name: z.ZodString;
110
+ }, z.core.$strip>>;
111
+ templatesNotListed: z.ZodNumber;
112
+ scanStopped: z.ZodBoolean;
113
+ }, z.core.$strip>>;
114
+ pages: z.ZodOptional<z.ZodObject<{
115
+ items: z.ZodArray<z.ZodObject<{
116
+ id: z.ZodString;
117
+ title: z.ZodString;
118
+ path: z.ZodString;
119
+ }, z.core.$strip>>;
120
+ nextCursor: z.ZodNullable<z.ZodString>;
121
+ }, z.core.$strip>>;
122
+ }, z.core.$strip>;
123
+ export type SwitchOffPreview = z.infer<typeof SwitchOffPreviewSchema>;
124
+ /** M35: a page of a switched-off plugin's document type cannot be created (409); existing pages stay editable. */
125
+ export declare const DOCUMENT_TYPE_SWITCHED_OFF_CODE = "document_type_switched_off";
126
+ /** M35: the refusal's body, the same from the admin's create and copy and the delivery API's create. */
127
+ export declare const DocumentTypeSwitchedOffSchema: z.ZodObject<{
128
+ code: z.ZodLiteral<"document_type_switched_off">;
129
+ message: z.ZodString;
130
+ }, z.core.$strip>;
131
+ export declare const DOCUMENT_TYPE_SWITCHED_OFF_MESSAGE = "The plugin that provides this document type is switched off, so no new page of it can be created. Switch the plugin on, or choose another type.";
132
+ /** M35 (final fix wave): a bundle member a bundle install has installed and not yet decided is not
133
+ * installed or updated through any other door until the bundle commits or rolls back (409). */
134
+ export declare const BUNDLE_INSTALL_IN_PROGRESS_CODE = "bundle_install_in_progress";
135
+ export declare const BundleInstallInProgressSchema: z.ZodObject<{
136
+ code: z.ZodLiteral<"bundle_install_in_progress">;
137
+ message: z.ZodString;
138
+ }, z.core.$strip>;
@@ -0,0 +1,110 @@
1
+ import { z } from "zod";
2
+ import { UNINSTALL_TEMPLATES_LISTED_MAX } from "./plugin-install-record.schema.js";
3
+ // M35 (operator bug 14, 2026-11-22): switching a plugin off and uninstalling it never destroy
4
+ // content. An uninstall keeps every page, the document types and data types pages use, the
5
+ // templates pages use with their assets, and every template the site owner edited; those parts
6
+ // carry a kept mark. These are the bounds and the shapes the keep plan, the previews and the marks
7
+ // share.
8
+ export const KEEP_PREVIEW_PAGE_SIZE = 50;
9
+ /** Sample pages an install may record is already bounded by SAMPLE_CONTENT_MAX_BYTES; the explicit list sent with an uninstall is capped here. */
10
+ export const UNINSTALL_SAMPLE_PAGES_MAX = 500;
11
+ /** The keep plan reads every document type of the site, a page of 100 at a time, to find the types
12
+ * whose default is one of the plugin's templates; past this many it stops and keeps everything. */
13
+ export const UNINSTALL_DOCUMENT_TYPES_SCANNED_MAX = 5000;
14
+ // The switch-off preview's template scan reuses UNINSTALL_TEMPLATES_SCANNED_MAX and
15
+ // UNINSTALL_TEMPLATES_LISTED_MAX (plugin-install-record.schema.ts) through templatesUsingNames; no
16
+ // new cap.
17
+ export const KeptPartStateSchema = z.enum(["on", "off", "uninstalled"]);
18
+ export const KeptTemplateReasonSchema = z.enum(["used", "edited", "referenced"]);
19
+ /** How far a delete or a preview counts a type's trashed pages; past it the answer says "at least". */
20
+ export const DOCUMENT_TYPE_TRASHED_COUNT_LIMIT = 1000;
21
+ /** GET /api/manage/v1/plugins/:pluginId/uninstall-preview: what an uninstall keeps and what goes, a
22
+ * part at a time, a pure read that never runs plugin code. */
23
+ export const UNINSTALL_PREVIEW_PARTS = ["summary", "samplePages", "documentTypes", "templates"];
24
+ export const UninstallPreviewQuerySchema = z.object({
25
+ part: z.enum(UNINSTALL_PREVIEW_PARTS),
26
+ cursor: z.string().max(200).optional(),
27
+ });
28
+ export const UninstallPreviewSchema = z.object({
29
+ summary: z
30
+ .object({
31
+ pageCount: z.number().int().nonnegative(),
32
+ documentTypesKept: z.number(),
33
+ templatesKept: z.number(),
34
+ templatesLeaving: z.number(),
35
+ assetsKept: z.boolean(),
36
+ dataSnapshotted: z.boolean(),
37
+ scanStopped: z.boolean(),
38
+ })
39
+ .optional(),
40
+ samplePages: z
41
+ .object({
42
+ items: z.array(z.object({ id: z.string(), title: z.string(), path: z.string(), edited: z.boolean() })).max(KEEP_PREVIEW_PAGE_SIZE),
43
+ nextCursor: z.string().nullable(),
44
+ })
45
+ .optional(),
46
+ documentTypes: z
47
+ .object({
48
+ items: z
49
+ .array(z.object({
50
+ id: z.string(),
51
+ name: z.string(),
52
+ livePages: z.number().int().nonnegative(),
53
+ trashedPages: z.number().int().nonnegative(),
54
+ trashedCapped: z.boolean(),
55
+ stays: z.boolean(),
56
+ }))
57
+ .max(KEEP_PREVIEW_PAGE_SIZE),
58
+ nextCursor: z.string().nullable(),
59
+ })
60
+ .optional(),
61
+ templates: z
62
+ .object({
63
+ items: z
64
+ .array(z.object({ id: z.string(), name: z.string(), kind: z.string(), stays: z.boolean(), reason: KeptTemplateReasonSchema.nullable() }))
65
+ .max(KEEP_PREVIEW_PAGE_SIZE),
66
+ nextCursor: z.string().nullable(),
67
+ })
68
+ .optional(),
69
+ });
70
+ /** GET /api/manage/v1/plugins/:pluginId/switch-off-preview: what a switch-off stops, and the
71
+ * published pages whose template loses a dynamic part (a tag or filter of the plugin writes
72
+ * nothing while it is off). Pages keep displaying; nothing is deleted. */
73
+ export const SwitchOffPreviewQuerySchema = z.object({
74
+ part: z.enum(["summary", "pages"]),
75
+ cursor: z.string().max(200).optional(),
76
+ });
77
+ export const SwitchOffPreviewSchema = z.object({
78
+ summary: z
79
+ .object({
80
+ stops: z.object({
81
+ adminScreens: z.number(),
82
+ apiRoutes: z.number(),
83
+ siteRoutes: z.number(),
84
+ scheduledTasks: z.number(),
85
+ hooks: z.number(),
86
+ templateTagsAndFilters: z.number(),
87
+ fieldEditors: z.number(),
88
+ }),
89
+ refusal: z.object({ code: z.string(), message: z.string() }).nullable(),
90
+ templatesWithDynamicParts: z.array(z.object({ id: z.string(), name: z.string() })).max(UNINSTALL_TEMPLATES_LISTED_MAX),
91
+ templatesNotListed: z.number(),
92
+ scanStopped: z.boolean(),
93
+ })
94
+ .optional(),
95
+ pages: z
96
+ .object({
97
+ items: z.array(z.object({ id: z.string(), title: z.string(), path: z.string() })).max(KEEP_PREVIEW_PAGE_SIZE),
98
+ nextCursor: z.string().nullable(),
99
+ })
100
+ .optional(),
101
+ });
102
+ /** M35: a page of a switched-off plugin's document type cannot be created (409); existing pages stay editable. */
103
+ export const DOCUMENT_TYPE_SWITCHED_OFF_CODE = "document_type_switched_off";
104
+ /** M35: the refusal's body, the same from the admin's create and copy and the delivery API's create. */
105
+ export const DocumentTypeSwitchedOffSchema = z.object({ code: z.literal(DOCUMENT_TYPE_SWITCHED_OFF_CODE), message: z.string() });
106
+ export const DOCUMENT_TYPE_SWITCHED_OFF_MESSAGE = "The plugin that provides this document type is switched off, so no new page of it can be created. Switch the plugin on, or choose another type.";
107
+ /** M35 (final fix wave): a bundle member a bundle install has installed and not yet decided is not
108
+ * installed or updated through any other door until the bundle commits or rolls back (409). */
109
+ export const BUNDLE_INSTALL_IN_PROGRESS_CODE = "bundle_install_in_progress";
110
+ export const BundleInstallInProgressSchema = z.object({ code: z.literal(BUNDLE_INSTALL_IN_PROGRESS_CODE), message: z.string() });