@kardalum/plugin-sdk 0.19.0 → 0.20.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 (366) hide show
  1. package/CHANGELOG.md +211 -0
  2. package/README.md +19 -0
  3. package/dist/admin-section-registry.d.ts +16 -1
  4. package/dist/admin-section-registry.js +23 -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 +55 -3
  13. package/dist/cli.d.ts +66 -0
  14. package/dist/cli.js +22 -0
  15. package/dist/content-library.d.ts +85 -0
  16. package/dist/content-library.js +15 -0
  17. package/dist/content-picker/page-picker-sheet.d.ts +13 -0
  18. package/dist/content-picker/page-picker-sheet.js +105 -0
  19. package/dist/content-picker/page-tree.d.ts +25 -0
  20. package/dist/content-picker/page-tree.js +132 -0
  21. package/dist/data-type-plugin.d.ts +7 -1
  22. package/dist/datatype-validation.d.ts +4 -9
  23. package/dist/datatype-validation.js +139 -1
  24. package/dist/entitlement-entry.d.ts +1 -1
  25. package/dist/entitlement-entry.js +1 -1
  26. package/dist/entitlement-gate.d.ts +14 -0
  27. package/dist/entitlement-gate.js +64 -7
  28. package/dist/entitlement-plan.d.ts +6 -0
  29. package/dist/entitlement-plan.js +10 -0
  30. package/dist/entitlement-types.d.ts +36 -12
  31. package/dist/entitlement.d.ts +31 -4
  32. package/dist/entitlement.js +58 -17
  33. package/dist/hook-entry.d.ts +5 -0
  34. package/dist/hook-entry.js +30 -0
  35. package/dist/host-entry.d.ts +1 -1
  36. package/dist/host-entry.js +1 -1
  37. package/dist/index.d.ts +36 -4
  38. package/dist/index.js +50 -3
  39. package/dist/mail.d.ts +30 -0
  40. package/dist/mail.js +1 -0
  41. package/dist/manifest-entry.d.ts +29 -4
  42. package/dist/manifest-entry.js +39 -2
  43. package/dist/manifest-schema.d.ts +443 -29
  44. package/dist/manifest-schema.js +285 -23
  45. package/dist/manifest.d.ts +450 -51
  46. package/dist/manifest.js +1 -1
  47. package/dist/media/media-picker.js +31 -18
  48. package/dist/media/upload-error.d.ts +5 -1
  49. package/dist/media/upload-error.js +14 -2
  50. package/dist/media-library.d.ts +32 -0
  51. package/dist/media-library.js +15 -0
  52. package/dist/nested-field-host.d.ts +76 -0
  53. package/dist/nested-field-host.js +90 -0
  54. package/dist/notify.d.ts +12 -4
  55. package/dist/notify.js +1 -1
  56. package/dist/outbound.d.ts +47 -0
  57. package/dist/outbound.js +1 -0
  58. package/dist/plugin-context.d.ts +5 -0
  59. package/dist/plugin-screen-context.d.ts +112 -0
  60. package/dist/plugin-screen-context.js +26 -0
  61. package/dist/providers.d.ts +268 -0
  62. package/dist/providers.js +74 -0
  63. package/dist/read-all-pages.d.ts +5 -0
  64. package/dist/read-all-pages.js +3 -2
  65. package/dist/richtext/block-panel.js +11 -6
  66. package/dist/richtext/insert-menu.js +9 -6
  67. package/dist/richtext/style-listbox.js +6 -4
  68. package/dist/sdk-strings.d.ts +285 -0
  69. package/dist/sdk-strings.js +347 -0
  70. package/dist/sealing.d.ts +14 -0
  71. package/dist/sealing.js +1 -0
  72. package/dist/simple-storage-value-provider.js +24 -24
  73. package/dist/structured-storage-types.d.ts +309 -9
  74. package/dist/text-entry.d.ts +1 -0
  75. package/dist/text-entry.js +6 -0
  76. package/dist/tokens/tailwind-theme.css +5 -0
  77. package/dist/tokens/tokens.css +15 -3
  78. package/dist/tokens/tokens.json +8 -3
  79. package/dist/views/asset-view.js +4 -1
  80. package/dist/views/content-list-preview.js +3 -1
  81. package/dist/views/content-list-settings-view.js +11 -7
  82. package/dist/views/content-list-view.d.ts +5 -3
  83. package/dist/views/content-list-view.js +38 -34
  84. package/dist/views/content-picker-view.d.ts +3 -0
  85. package/dist/views/content-picker-view.js +143 -0
  86. package/dist/views/crop-view.d.ts +4 -6
  87. package/dist/views/crop-view.js +22 -13
  88. package/dist/views/date-range-view.js +4 -1
  89. package/dist/views/file-upload-view.d.ts +5 -7
  90. package/dist/views/file-upload-view.js +16 -7
  91. package/dist/views/group-view.d.ts +8 -0
  92. package/dist/views/group-view.js +123 -0
  93. package/dist/views/html-view.js +7 -6
  94. package/dist/views/image-view.js +37 -19
  95. package/dist/views/link-view.d.ts +3 -0
  96. package/dist/views/link-view.js +150 -0
  97. package/dist/views/options-list-view.d.ts +3 -0
  98. package/dist/views/options-list-view.js +104 -0
  99. package/dist/views/repeatable-list-view.d.ts +3 -0
  100. package/dist/views/repeatable-list-view.js +113 -0
  101. package/dist/views/rich-text-view.js +28 -13
  102. package/dist/views/suggest-key.d.ts +17 -0
  103. package/dist/views/suggest-key.js +55 -0
  104. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +215 -0
  105. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +179 -0
  106. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
  107. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
  108. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
  109. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
  110. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +7 -1
  111. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
  112. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +1 -0
  113. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +27 -0
  114. package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
  115. package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +126 -0
  116. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
  117. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
  118. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +57 -2
  119. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +137 -0
  120. package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
  121. package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
  122. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
  123. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
  124. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
  125. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
  126. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
  127. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
  128. package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
  129. package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
  130. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
  131. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
  132. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +10 -5
  133. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +7 -4
  134. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
  135. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +8 -0
  136. package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
  137. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
  138. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
  139. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +180 -15
  140. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +41 -5
  141. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
  142. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +90 -5
  143. package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
  144. package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
  145. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
  146. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
  147. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
  148. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
  149. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +117 -41
  150. package/node_modules/@kardalum/api-schemas/dist/index.js +89 -26
  151. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
  152. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
  153. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
  154. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
  155. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
  156. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
  157. package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +224 -0
  158. package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +404 -0
  159. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
  160. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
  161. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
  162. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
  163. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +312 -8
  164. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +43 -3
  165. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
  166. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
  167. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
  168. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
  169. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
  170. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
  171. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
  172. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
  173. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
  174. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
  175. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
  176. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
  177. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
  178. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
  179. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +22 -0
  180. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
  181. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
  182. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
  183. package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
  184. package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
  185. package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
  186. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +1 -0
  187. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
  188. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
  189. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
  190. package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +53 -0
  191. package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +284 -0
  192. package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
  193. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
  194. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
  195. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
  196. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
  197. package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
  198. package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
  199. package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
  200. package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
  201. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
  202. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
  203. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
  204. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
  205. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
  206. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
  207. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
  208. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
  209. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
  210. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
  211. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +42 -0
  212. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +74 -0
  213. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
  214. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
  215. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +26 -2
  216. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +26 -2
  217. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +13 -5
  218. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
  219. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
  220. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +26 -0
  221. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +55 -0
  222. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +40 -0
  223. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +124 -0
  224. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
  225. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
  226. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
  227. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
  228. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +107 -0
  229. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +213 -0
  230. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
  231. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
  232. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
  233. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
  234. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +44 -0
  235. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +38 -1
  236. package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +237 -2
  237. package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +205 -6
  238. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
  239. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
  240. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
  241. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
  242. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +335 -6
  243. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +242 -2
  244. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +16 -1
  245. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +34 -1
  246. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
  247. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
  248. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +22 -1
  249. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +31 -1
  250. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
  251. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
  252. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
  253. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
  254. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
  255. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
  256. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +310 -0
  257. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +430 -0
  258. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
  259. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
  260. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
  261. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
  262. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
  263. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
  264. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +342 -0
  265. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +400 -0
  266. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +180 -0
  267. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +612 -0
  268. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
  269. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +47 -4
  270. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
  271. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
  272. package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
  273. package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
  274. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
  275. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
  276. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
  277. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
  278. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
  279. package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
  280. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +6 -0
  281. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +82 -0
  282. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
  283. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +497 -0
  284. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
  285. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
  286. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
  287. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
  288. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +91 -1
  289. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +90 -8
  290. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +59 -1
  291. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +110 -0
  292. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +34 -2
  293. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +384 -0
  294. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +616 -0
  295. package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
  296. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
  297. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
  298. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
  299. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +66 -0
  300. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +160 -0
  301. package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
  302. package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
  303. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
  304. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
  305. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
  306. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
  307. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +58 -1
  308. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +34 -3
  309. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
  310. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
  311. package/node_modules/@kardalum/api-schemas/package.json +1 -0
  312. package/node_modules/@kardalum/design-tokens/dist/build-css.js +6 -0
  313. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +5 -0
  314. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -1
  315. package/node_modules/@kardalum/design-tokens/dist/tokens.css +15 -3
  316. package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
  317. package/node_modules/@kardalum/design-tokens/dist/tokens.js +12 -3
  318. package/node_modules/@kardalum/design-tokens/dist/tokens.json +8 -3
  319. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +1 -1
  320. package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +21 -2
  321. package/node_modules/@kardalum/plugin-package/dist/build-reference.js +8 -2
  322. package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
  323. package/node_modules/@kardalum/plugin-package/dist/capabilities.js +355 -22
  324. package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
  325. package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +2 -0
  326. package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
  327. package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
  328. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
  329. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
  330. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
  331. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
  332. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
  333. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +34 -0
  334. package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
  335. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
  336. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +27 -0
  337. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
  338. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
  339. package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +1 -0
  340. package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +1 -0
  341. package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +47 -5
  342. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
  343. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +95 -0
  344. package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
  345. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
  346. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
  347. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +3 -0
  348. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +298 -0
  349. package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +25 -4
  350. package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
  351. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
  352. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +140 -0
  353. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
  354. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +36 -0
  355. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
  356. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
  357. package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +10 -0
  358. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -2
  359. package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
  360. package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
  361. package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
  362. package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
  363. package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
  364. package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
  365. package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
  366. package/package.json +12 -2
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { THUMBNAIL_EDITOR_ID } from "./media-rendition.schema.js";
3
3
  import { NodeAccessFlagsSchema } from "./node-access.schema.js";
4
+ import { UuidStringSchema } from "./uuid.schema.js";
4
5
  // S232: past this many children, the tree stops rendering them as
5
6
  // expandable rows and shows a hint to mark the type as a collection
6
7
  // instead (see contentTree.collectionHint in the admin). Shared between
@@ -137,3 +138,139 @@ export const CONTENT_LIST_DATA_TYPE_CONFIG = {
137
138
  editorId: CONTENT_LIST_EDITOR_ID,
138
139
  settings: CONTENT_LIST_DEFAULT_SETTINGS,
139
140
  };
141
+ // M32 E: the template list helper's shapes. The arguments come from a template, the marker
142
+ // from a visitor's query string; both are read here with length caps and linear scans, never
143
+ // with a pattern.
144
+ export const CONTENT_LIST_LIMIT_MAX = 50;
145
+ export const CONTENT_LIST_LIMIT_DEFAULT = 10;
146
+ export const CONTENT_LIST_SORT_MAX = 80;
147
+ /** A text sort compares the first 100 characters (code points) of the value. */
148
+ export const CONTENT_LIST_SORT_VALUE_MAX = 100;
149
+ export const CONTENT_LIST_MARKER_MAX = 1024;
150
+ /** A field sort runs only when its scope holds at most this many published pages (D7). */
151
+ export const CONTENT_LIST_FIELD_SORT_MAX = 5000;
152
+ export const CONTENT_LIST_FIELD_ID_MAX = 64;
153
+ // M32 F4e (E4): template site search. The text and the cursor come from a visitor's query string
154
+ // (`?q=`, `?search_after=`), read once each within these caps; the rest bound a render's searches.
155
+ export const TEMPLATE_SEARCH_TEXT_MAX = 200;
156
+ export const TEMPLATE_SEARCH_CURSOR_MAX = 512;
157
+ export const TEMPLATE_SEARCH_LIMIT_MAX = 20;
158
+ export const TEMPLATE_SEARCH_LIMIT_DEFAULT = 10;
159
+ export const TEMPLATE_SEARCHES_MAX = 2;
160
+ /** The longest document type name `{% list %}` and `{% search %}` read as `type:`. */
161
+ export const TEMPLATE_TYPE_NAME_MAX = 200;
162
+ export const ContentListArgsSchema = z
163
+ .object({
164
+ type: z.string().trim().min(1).max(TEMPLATE_TYPE_NAME_MAX).optional(),
165
+ parent: z.unknown().optional(),
166
+ sort: z.string().max(CONTENT_LIST_SORT_MAX).optional(),
167
+ limit: z.number().int().min(1).max(CONTENT_LIST_LIMIT_MAX).optional(),
168
+ paged: z.boolean().optional(),
169
+ })
170
+ .strict();
171
+ /** A field id's form (letters, digits, underscore, a letter first), at most 64 characters. */
172
+ export function isContentListFieldId(value) {
173
+ if (value.length === 0 || value.length > CONTENT_LIST_FIELD_ID_MAX)
174
+ return false;
175
+ for (let i = 0; i < value.length; i++) {
176
+ const c = value.charCodeAt(i);
177
+ const letter = (c >= 65 && c <= 90) || (c >= 97 && c <= 122);
178
+ const digit = c >= 48 && c <= 57;
179
+ if (i === 0 ? !letter : !(letter || digit || c === 95))
180
+ return false;
181
+ }
182
+ return true;
183
+ }
184
+ /** D5: "<key>" or "<key> asc|desc". Null when it is anything else. */
185
+ export function parseContentListSort(raw) {
186
+ const text = (raw ?? "").trim();
187
+ if (text.length > CONTENT_LIST_SORT_MAX)
188
+ return null;
189
+ if (text === "")
190
+ return { key: { kind: "published" }, direction: "desc", canonical: "published desc" };
191
+ const space = text.indexOf(" ");
192
+ const word = space === -1 ? text : text.slice(0, space);
193
+ const rest = space === -1 ? "" : text.slice(space + 1).trim();
194
+ if (rest !== "" && rest !== "asc" && rest !== "desc")
195
+ return null;
196
+ let key;
197
+ if (word === "published")
198
+ key = { kind: "published" };
199
+ else if (word === "order")
200
+ key = { kind: "order" };
201
+ else if (isContentListFieldId(word))
202
+ key = { kind: "field", field: word };
203
+ else
204
+ return null;
205
+ const direction = rest === "" ? (key.kind === "published" ? "desc" : "asc") : rest;
206
+ return { key, direction, canonical: `${word} ${direction}` };
207
+ }
208
+ // A value of 100 code points is up to 200 UTF-16 units.
209
+ const CursorTupleSchema = z.tuple([
210
+ z.string().min(1).max(CONTENT_LIST_SORT_MAX),
211
+ z.union([z.string().max(CONTENT_LIST_SORT_VALUE_MAX * 2), z.number().finite(), z.null()]),
212
+ UuidStringSchema,
213
+ ]);
214
+ /** D11: a non-empty string of at most 1024 base64url characters. One linear scan. */
215
+ export function isContentListMarker(raw) {
216
+ if (typeof raw !== "string" || raw.length === 0 || raw.length > CONTENT_LIST_MARKER_MAX)
217
+ return false;
218
+ for (let i = 0; i < raw.length; i++) {
219
+ const c = raw.charCodeAt(i);
220
+ const ok = (c >= 65 && c <= 90) || (c >= 97 && c <= 122) || (c >= 48 && c <= 57) || c === 45 || c === 95;
221
+ if (!ok)
222
+ return false;
223
+ }
224
+ return true;
225
+ }
226
+ /** base64url of the UTF-8 JSON `[sort, value, id]`, without padding. */
227
+ export function encodeContentListCursor(cursor) {
228
+ const bytes = new TextEncoder().encode(JSON.stringify([cursor.sort, cursor.value, cursor.id]));
229
+ let binary = "";
230
+ for (const byte of bytes)
231
+ binary += String.fromCharCode(byte);
232
+ const b64 = btoa(binary);
233
+ let out = "";
234
+ for (let i = 0; i < b64.length; i++) {
235
+ const ch = b64[i];
236
+ if (ch === "=")
237
+ break;
238
+ out += ch === "+" ? "-" : ch === "/" ? "_" : ch;
239
+ }
240
+ return out;
241
+ }
242
+ /** The marker's tuple, or null for anything that is not one this code minted the shape of. */
243
+ export function decodeContentListCursor(raw) {
244
+ if (!isContentListMarker(raw))
245
+ return null;
246
+ let b64 = "";
247
+ for (let i = 0; i < raw.length; i++) {
248
+ const ch = raw[i];
249
+ b64 += ch === "-" ? "+" : ch === "_" ? "/" : ch;
250
+ }
251
+ while (b64.length % 4 !== 0)
252
+ b64 += "=";
253
+ let text;
254
+ try {
255
+ const binary = atob(b64);
256
+ const bytes = new Uint8Array(binary.length);
257
+ for (let i = 0; i < binary.length; i++)
258
+ bytes[i] = binary.charCodeAt(i);
259
+ text = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
260
+ }
261
+ catch {
262
+ return null;
263
+ }
264
+ let parsed;
265
+ try {
266
+ parsed = JSON.parse(text);
267
+ }
268
+ catch {
269
+ return null;
270
+ }
271
+ const result = CursorTupleSchema.safeParse(parsed);
272
+ if (!result.success)
273
+ return null;
274
+ const [sort, value, id] = result.data;
275
+ return { sort, value, id: id.toLowerCase() };
276
+ }
@@ -27,7 +27,7 @@ export declare const CONTENT_NAME_KEY = "_name";
27
27
  * had no usable URL at all, and an Arabic-speaking editor had to invent a
28
28
  * Latin name for every page they created. Unicode in a URL is a standard
29
29
  * (RFC 3987), browsers display it natively and percent-encode it on the
30
- * wire, and Umbraco has done this for years.
30
+ * wire, and other systems have done this for years.
31
31
  *
32
32
  * So letters and digits of ANY script survive, and only what genuinely
33
33
  * cannot sit in a path segment is replaced. `""` now comes back only for
@@ -47,7 +47,7 @@ const MAX_SLUG_LENGTH = 200;
47
47
  * had no usable URL at all, and an Arabic-speaking editor had to invent a
48
48
  * Latin name for every page they created. Unicode in a URL is a standard
49
49
  * (RFC 3987), browsers display it natively and percent-encode it on the
50
- * wire, and Umbraco has done this for years.
50
+ * wire, and other systems have done this for years.
51
51
  *
52
52
  * So letters and digits of ANY script survive, and only what genuinely
53
53
  * cannot sit in a path segment is replaced. `""` now comes back only for
@@ -0,0 +1,50 @@
1
+ import { z } from "zod";
2
+ export declare const CONTENT_SEARCH_PAGE_SIZE = 50;
3
+ export declare const CONTENT_SEARCH_STATES: readonly ["draft", "published", "trashed"];
4
+ export declare const ContentSearchStateSchema: z.ZodEnum<{
5
+ published: "published";
6
+ draft: "draft";
7
+ trashed: "trashed";
8
+ }>;
9
+ export declare const ContentSearchQuerySchema: z.ZodObject<{
10
+ q: z.ZodOptional<z.ZodString>;
11
+ documentTypeId: z.ZodOptional<z.ZodString>;
12
+ state: z.ZodOptional<z.ZodEnum<{
13
+ published: "published";
14
+ draft: "draft";
15
+ trashed: "trashed";
16
+ }>>;
17
+ parentId: z.ZodOptional<z.ZodString>;
18
+ cursor: z.ZodOptional<z.ZodString>;
19
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
20
+ }, z.core.$strip>;
21
+ export type ContentSearchQuery = z.infer<typeof ContentSearchQuerySchema>;
22
+ export declare const ContentSearchRowSchema: z.ZodObject<{
23
+ id: z.ZodString;
24
+ name: z.ZodString;
25
+ path: z.ZodString;
26
+ documentTypeId: z.ZodString;
27
+ state: z.ZodEnum<{
28
+ published: "published";
29
+ draft: "draft";
30
+ trashed: "trashed";
31
+ }>;
32
+ changes: z.ZodBoolean;
33
+ }, z.core.$strip>;
34
+ export type ContentSearchRow = z.infer<typeof ContentSearchRowSchema>;
35
+ export declare const ContentSearchResponseSchema: z.ZodObject<{
36
+ items: z.ZodArray<z.ZodObject<{
37
+ id: z.ZodString;
38
+ name: z.ZodString;
39
+ path: z.ZodString;
40
+ documentTypeId: z.ZodString;
41
+ state: z.ZodEnum<{
42
+ published: "published";
43
+ draft: "draft";
44
+ trashed: "trashed";
45
+ }>;
46
+ changes: z.ZodBoolean;
47
+ }, z.core.$strip>>;
48
+ nextCursor: z.ZodNullable<z.ZodString>;
49
+ }, z.core.$strip>;
50
+ export type ContentSearchResponse = z.infer<typeof ContentSearchResponseSchema>;
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ import { isTrashCursor } from "./trash-cursor.schema.js";
3
+ // M31.5 A (D3): GET /api/manage/v1/content/search, pages by name or address across
4
+ // the tree, drafts included, for the find_pages tool. `q` is matched as a
5
+ // case-insensitive substring of the display name and of the last path segment;
6
+ // `parentId` keeps the pages anywhere under that page; `state` is the default
7
+ // language's (published when its pointer has a publishedAt), and `trashed` lists
8
+ // the tops of trashed branches, as the trash list does. The route scans a bounded
9
+ // number of nodes per request, so a page may hold fewer than `limit` rows while
10
+ // `nextCursor` is not null: pass it back to go on.
11
+ export const CONTENT_SEARCH_PAGE_SIZE = 50;
12
+ export const CONTENT_SEARCH_STATES = ["draft", "published", "trashed"];
13
+ export const ContentSearchStateSchema = z.enum(CONTENT_SEARCH_STATES);
14
+ export const ContentSearchQuerySchema = z.object({
15
+ q: z.string().max(200).optional(),
16
+ documentTypeId: z.string().uuid().optional(),
17
+ state: ContentSearchStateSchema.optional(),
18
+ parentId: z.string().uuid().optional(),
19
+ cursor: z.string().min(1).max(300).optional(),
20
+ limit: z.coerce.number().int().min(1).max(CONTENT_SEARCH_PAGE_SIZE).default(CONTENT_SEARCH_PAGE_SIZE),
21
+ }).superRefine((query, ctx) => {
22
+ // A live search pages by node id; the trash list pages by `${deletedAt}|${id}`. A cursor of
23
+ // the wrong kind answers 400 here rather than reaching a keyset comparison (S314c2).
24
+ if (query.cursor === undefined)
25
+ return;
26
+ const valid = query.state === "trashed" ? isTrashCursor(query.cursor) : z.string().uuid().safeParse(query.cursor).success;
27
+ if (!valid)
28
+ ctx.addIssue({ code: "custom", path: ["cursor"], message: query.state === "trashed" ? "cursor must be a nextCursor the trashed search answered" : "cursor must be a nextCursor this search answered: a page id" });
29
+ });
30
+ export const ContentSearchRowSchema = z.object({
31
+ id: z.string().uuid(),
32
+ name: z.string(),
33
+ path: z.string(),
34
+ documentTypeId: z.string().uuid(),
35
+ state: ContentSearchStateSchema,
36
+ // A published page with a saved version newer than the one it serves.
37
+ changes: z.boolean(),
38
+ });
39
+ export const ContentSearchResponseSchema = z.object({
40
+ items: z.array(ContentSearchRowSchema),
41
+ nextCursor: z.string().nullable(),
42
+ });
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+ export declare const CONTENT_SUMMARIES_MAX = 50;
3
+ export declare const ContentSummariesQuerySchema: z.ZodObject<{
4
+ ids: z.ZodString;
5
+ locale: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export type ContentSummariesQuery = z.infer<typeof ContentSummariesQuerySchema>;
8
+ export declare const ContentSummarySchema: z.ZodObject<{
9
+ id: z.ZodString;
10
+ state: z.ZodEnum<{
11
+ live: "live";
12
+ trashed: "trashed";
13
+ missing: "missing";
14
+ }>;
15
+ published: z.ZodBoolean;
16
+ readable: z.ZodBoolean;
17
+ name: z.ZodNullable<z.ZodString>;
18
+ path: z.ZodNullable<z.ZodString>;
19
+ documentTypeId: z.ZodNullable<z.ZodString>;
20
+ }, z.core.$strip>;
21
+ export type ContentSummary = z.infer<typeof ContentSummarySchema>;
22
+ export declare const ContentSummariesResponseSchema: z.ZodObject<{
23
+ items: z.ZodArray<z.ZodObject<{
24
+ id: z.ZodString;
25
+ state: z.ZodEnum<{
26
+ live: "live";
27
+ trashed: "trashed";
28
+ missing: "missing";
29
+ }>;
30
+ published: z.ZodBoolean;
31
+ readable: z.ZodBoolean;
32
+ name: z.ZodNullable<z.ZodString>;
33
+ path: z.ZodNullable<z.ZodString>;
34
+ documentTypeId: z.ZodNullable<z.ZodString>;
35
+ }, z.core.$strip>>;
36
+ }, z.core.$strip>;
37
+ export type ContentSummariesResponse = z.infer<typeof ContentSummariesResponseSchema>;
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+ // M32 C (D13): what the content editor reads to mark picked pages. One request per field, at most
3
+ // CONTENT_SUMMARIES_MAX ids, answered in the order asked.
4
+ export const CONTENT_SUMMARIES_MAX = 50;
5
+ export const ContentSummariesQuerySchema = z.object({
6
+ // Comma-separated uuids; split and checked by the route (a query string carries no array).
7
+ ids: z.string().min(1).max(CONTENT_SUMMARIES_MAX * 37),
8
+ locale: z.string().min(2).max(35).optional(),
9
+ });
10
+ export const ContentSummarySchema = z.object({
11
+ id: z.string().uuid(),
12
+ state: z.enum(["live", "trashed", "missing"]),
13
+ published: z.boolean(),
14
+ readable: z.boolean(),
15
+ name: z.string().nullable(),
16
+ path: z.string().nullable(),
17
+ documentTypeId: z.string().uuid().nullable(),
18
+ });
19
+ export const ContentSummariesResponseSchema = z.object({ items: z.array(ContentSummarySchema) });
@@ -0,0 +1,23 @@
1
+ import { z } from "zod";
2
+ export declare const UnpublishContentRequestSchema: z.ZodObject<{
3
+ culture: z.ZodOptional<z.ZodString>;
4
+ }, z.core.$strict>;
5
+ export type UnpublishContentRequest = z.infer<typeof UnpublishContentRequestSchema>;
6
+ export declare const UnpublishContentResponseSchema: z.ZodObject<{
7
+ node: z.ZodObject<{
8
+ id: z.ZodString;
9
+ parentId: z.ZodNullable<z.ZodString>;
10
+ path: z.ZodString;
11
+ depth: z.ZodNumber;
12
+ sortOrder: z.ZodNumber;
13
+ documentTypeId: z.ZodString;
14
+ publishedAt: z.ZodNullable<z.ZodString>;
15
+ }, z.core.$strip>;
16
+ unpublished: z.ZodArray<z.ZodString>;
17
+ cultures: z.ZodArray<z.ZodObject<{
18
+ culture: z.ZodString;
19
+ currentVersion: z.ZodNumber;
20
+ publishedAt: z.ZodNullable<z.ZodString>;
21
+ }, z.core.$strip>>;
22
+ }, z.core.$strip>;
23
+ export type UnpublishContentResponse = z.infer<typeof UnpublishContentResponseSchema>;
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+ import { StoredCultureSchema } from "./content-api.schema.js";
3
+ import { ContentNodeSchema, NodeCultureSchema } from "./content.schema.js";
4
+ // M31.5 A (D4): POST /api/manage/v1/content/:id/unpublish. A culture takes that
5
+ // language off the site; none takes every published language off. The answer
6
+ // names the cultures that were published and are not now, and every pointer as
7
+ // it stands after: each keeps the version it served, with no publishedAt.
8
+ export const UnpublishContentRequestSchema = z.object({ culture: StoredCultureSchema.optional() }).strict();
9
+ export const UnpublishContentResponseSchema = z.object({
10
+ node: ContentNodeSchema,
11
+ unpublished: z.array(z.string()),
12
+ cultures: z.array(NodeCultureSchema),
13
+ });
@@ -1,4 +1,7 @@
1
1
  import { z } from "zod";
2
+ export declare const NODE_BATCH_READ_MAX = 100;
3
+ export declare const PUBLISHED_VERSION_CULTURES_MAX = 2;
4
+ export declare const CULTURE_TAG_STORED_MAX = 35;
2
5
  export declare const ContentNodeSchema: z.ZodObject<{
3
6
  id: z.ZodString;
4
7
  parentId: z.ZodNullable<z.ZodString>;
@@ -1,4 +1,14 @@
1
1
  import { z } from "zod";
2
+ // M32 I2 (A1): the most nodes one batch read by id answers.
3
+ export const NODE_BATCH_READ_MAX = 100;
4
+ // M32 L3: a published version read filtered by culture names at most two (a list page's asked and default
5
+ // language), so a page of NODE_BATCH_READ_MAX rows reads at most 200 versions in one query.
6
+ export const PUBLISHED_VERSION_CULTURES_MAX = 2;
7
+ // M32 L3: the longest language tag a page's language pointer stores, alike on every dialect. MySQL's
8
+ // content_node_cultures.culture is VARCHAR(35), the size RFC 5646 (section 4.4.1) asks every tag store to hold,
9
+ // so the adapters refuse a longer tag before any write and the site's language list refuses one too. A read
10
+ // filter takes up to CULTURE_TAG_MAX (64): a longer asked tag simply matches nothing stored.
11
+ export const CULTURE_TAG_STORED_MAX = 35;
2
12
  export const ContentNodeSchema = z.object({
3
13
  id: z.string().uuid(),
4
14
  parentId: z.string().uuid().nullable(),
@@ -0,0 +1,41 @@
1
+ import { z } from "zod";
2
+ export declare const CONTRACT_CANCEL_EMAIL_MAX = 254;
3
+ export declare const CONTRACT_CANCEL_REFERENCE_MAX = 64;
4
+ export declare const CONTRACT_CANCEL_REASON_MAX = 2000;
5
+ export declare const CANCELLATION_NOTE_MAX = 2000;
6
+ /** An invoice number as the invoices print it: "RE-", a 4-digit year, "-",
7
+ * then 1 to 8 digits. S367f (D12): the letters in either case, as a person
8
+ * types them; the match upper-cases (referenceForMatch). */
9
+ export declare function isInvoiceNumber(value: string): boolean;
10
+ /** A licence key's shape: the prefix and 40 lowercase hex characters. */
11
+ export declare function isLicenceKeyShape(value: string): boolean;
12
+ /** YYYY-MM-DD naming a real calendar day. */
13
+ export declare function isIsoDay(value: string): boolean;
14
+ export declare const ContractCancelInputSchema: z.ZodObject<{
15
+ email: z.ZodString;
16
+ reference: z.ZodString;
17
+ kind: z.ZodEnum<{
18
+ ordinary: "ordinary";
19
+ extraordinary: "extraordinary";
20
+ }>;
21
+ reason: z.ZodOptional<z.ZodString>;
22
+ when: z.ZodEnum<{
23
+ date: "date";
24
+ earliest: "earliest";
25
+ }>;
26
+ date: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strict>;
28
+ export type ContractCancelInput = z.infer<typeof ContractCancelInputSchema>;
29
+ export declare const CancellationHandleInputSchema: z.ZodObject<{
30
+ requestId: z.ZodString;
31
+ note: z.ZodString;
32
+ }, z.core.$strict>;
33
+ export type CancellationHandleInput = z.infer<typeof CancellationHandleInputSchema>;
34
+ /** S367c fix wave (I1): "Carry out" on a waiting request, with the note the
35
+ * person records. The same fields as "Mark handled"; kept apart so either
36
+ * can change without the other. */
37
+ export declare const CancellationCarryOutInputSchema: z.ZodObject<{
38
+ requestId: z.ZodString;
39
+ note: z.ZodString;
40
+ }, z.core.$strict>;
41
+ export type CancellationCarryOutInput = z.infer<typeof CancellationCarryOutInputSchema>;
@@ -0,0 +1,86 @@
1
+ import { z } from "zod";
2
+ import { isPayoutEmail } from "./marketplace-payouts.schema.js";
3
+ // S367c (§ 312k BGB): the no-login cancel form and the operator's "Mark
4
+ // handled". Every check over what a visitor types is a character loop with
5
+ // the length capped first, never a pattern.
6
+ export const CONTRACT_CANCEL_EMAIL_MAX = 254;
7
+ export const CONTRACT_CANCEL_REFERENCE_MAX = 64;
8
+ export const CONTRACT_CANCEL_REASON_MAX = 2000;
9
+ export const CANCELLATION_NOTE_MAX = 2000;
10
+ const isDigit = (c) => c >= 48 && c <= 57;
11
+ /** An invoice number as the invoices print it: "RE-", a 4-digit year, "-",
12
+ * then 1 to 8 digits. S367f (D12): the letters in either case, as a person
13
+ * types them; the match upper-cases (referenceForMatch). */
14
+ export function isInvoiceNumber(value) {
15
+ if (value.length < 9 || value.length > 16)
16
+ return false;
17
+ const r = value.charCodeAt(0);
18
+ const e = value.charCodeAt(1);
19
+ if (!(r === 82 || r === 114) || !(e === 69 || e === 101) || value.charCodeAt(2) !== 45)
20
+ return false;
21
+ for (let i = 3; i < 7; i++)
22
+ if (!isDigit(value.charCodeAt(i)))
23
+ return false;
24
+ if (value.charCodeAt(7) !== 45)
25
+ return false;
26
+ for (let i = 8; i < value.length; i++)
27
+ if (!isDigit(value.charCodeAt(i)))
28
+ return false;
29
+ return true;
30
+ }
31
+ const KEY_PREFIX = "vlic_";
32
+ const KEY_HEX = 40;
33
+ /** A licence key's shape: the prefix and 40 lowercase hex characters. */
34
+ export function isLicenceKeyShape(value) {
35
+ if (value.length !== KEY_PREFIX.length + KEY_HEX || !value.startsWith(KEY_PREFIX))
36
+ return false;
37
+ for (let i = KEY_PREFIX.length; i < value.length; i++) {
38
+ const c = value.charCodeAt(i);
39
+ if (!(isDigit(c) || (c >= 97 && c <= 102)))
40
+ return false;
41
+ }
42
+ return true;
43
+ }
44
+ /** YYYY-MM-DD naming a real calendar day. */
45
+ export function isIsoDay(value) {
46
+ if (value.length !== 10 || value.charCodeAt(4) !== 45 || value.charCodeAt(7) !== 45)
47
+ return false;
48
+ for (const i of [0, 1, 2, 3, 5, 6, 8, 9])
49
+ if (!isDigit(value.charCodeAt(i)))
50
+ return false;
51
+ const y = Number(value.slice(0, 4));
52
+ const m = Number(value.slice(5, 7));
53
+ const d = Number(value.slice(8, 10));
54
+ if (m < 1 || m > 12 || d < 1)
55
+ return false;
56
+ return d <= new Date(Date.UTC(y, m, 0)).getUTCDate();
57
+ }
58
+ const today = () => new Date().toISOString().slice(0, 10);
59
+ export const ContractCancelInputSchema = z
60
+ .object({
61
+ email: z.string().trim().toLowerCase().max(CONTRACT_CANCEL_EMAIL_MAX).refine(isPayoutEmail, "Enter an email address"),
62
+ reference: z.string().trim().max(CONTRACT_CANCEL_REFERENCE_MAX).refine((v) => isInvoiceNumber(v) || isLicenceKeyShape(v), "Enter an invoice number or a licence key"),
63
+ kind: z.enum(["ordinary", "extraordinary"]),
64
+ reason: z.string().trim().max(CONTRACT_CANCEL_REASON_MAX).optional(),
65
+ when: z.enum(["earliest", "date"]),
66
+ date: z.string().trim().max(10).optional(),
67
+ })
68
+ .strict()
69
+ .superRefine((input, ctx) => {
70
+ if (input.kind === "extraordinary" && !input.reason)
71
+ ctx.addIssue({ code: "custom", path: ["reason"], message: "Give the reason" });
72
+ if (input.when === "date") {
73
+ // ISO days compare as strings once both are real days.
74
+ if (!input.date || !isIsoDay(input.date) || input.date < today())
75
+ ctx.addIssue({ code: "custom", path: ["date"], message: "Choose a day from today on" });
76
+ }
77
+ });
78
+ export const CancellationHandleInputSchema = z
79
+ .object({ requestId: z.string().uuid(), note: z.string().trim().min(1).max(CANCELLATION_NOTE_MAX) })
80
+ .strict();
81
+ /** S367c fix wave (I1): "Carry out" on a waiting request, with the note the
82
+ * person records. The same fields as "Mark handled"; kept apart so either
83
+ * can change without the other. */
84
+ export const CancellationCarryOutInputSchema = z
85
+ .object({ requestId: z.string().uuid(), note: z.string().trim().min(1).max(CANCELLATION_NOTE_MAX) })
86
+ .strict();
@@ -20,7 +20,7 @@ export declare const CORE_ACTIONS: readonly [{
20
20
  readonly adminGatedToday: false;
21
21
  readonly label: "View content and mint preview links";
22
22
  readonly keyNote: "On the management API this also reads drafts, every saved version and preview links, not only published content.";
23
- readonly route: "GET /api/manage/v1/content/by-path, GET /api/manage/v1/content/by-address, GET /api/manage/v1/content/:id, GET /api/manage/v1/content/roots, GET /api/manage/v1/content/:id/children, GET /api/manage/v1/content/:id/list, GET /api/manage/v1/content/:id/url-impact, GET /api/manage/v1/content/:id/move-impact, GET /api/manage/v1/content/:id/versions, GET /api/manage/v1/content/:id/versions/latest, GET /api/manage/v1/content/:id/versions/:version, POST /api/manage/v1/content/:id/preview-token, GET /api/manage/v1/home/drafts, GET /api/manage/v1/home/recent-edits, GET /api/manage/v1/home/published, GET /api/plugins/:pluginId/storage/:contentId/:fieldId";
23
+ readonly route: "GET /api/manage/v1/content/by-path, GET /api/manage/v1/content/by-address, GET /api/manage/v1/content/:id, GET /api/manage/v1/content/roots, GET /api/manage/v1/content/:id/children, GET /api/manage/v1/content/:id/list, GET /api/manage/v1/content/search, GET /api/manage/v1/content/:id/url-impact, GET /api/manage/v1/content/:id/move-impact, GET /api/manage/v1/content/:id/versions, GET /api/manage/v1/content/:id/versions/latest, GET /api/manage/v1/content/:id/versions/:version, POST /api/manage/v1/content/:id/preview-token, GET /api/manage/v1/home/drafts, GET /api/manage/v1/home/recent-edits, GET /api/manage/v1/home/published, GET /api/plugins/:pluginId/storage/:contentId/:fieldId";
24
24
  }, {
25
25
  readonly action: "content.create";
26
26
  readonly adminGatedToday: false;
@@ -36,6 +36,11 @@ export declare const CORE_ACTIONS: readonly [{
36
36
  readonly adminGatedToday: false;
37
37
  readonly label: "Publish content";
38
38
  readonly route: "POST /api/manage/v1/content/:id/publish, POST /api/manage/v1/content/:id/publish-all";
39
+ }, {
40
+ readonly action: "content.unpublish";
41
+ readonly adminGatedToday: false;
42
+ readonly label: "Unpublish content";
43
+ readonly route: "POST /api/manage/v1/content/:id/unpublish";
39
44
  }, {
40
45
  readonly action: "content.delete";
41
46
  readonly adminGatedToday: true;
@@ -213,12 +218,12 @@ export declare const CORE_ACTIONS: readonly [{
213
218
  readonly action: "settings.read";
214
219
  readonly adminGatedToday: false;
215
220
  readonly label: "View settings";
216
- readonly route: "GET /api/manage/v1/settings/render, GET /api/manage/v1/settings/cultures, GET /api/manage/v1/settings/sites, GET /api/manage/v1/settings/nav, GET /api/manage/v1/settings/audit-retention, GET /api/manage/v1/home/news, GET /api/manage/v1/settings/notification-retention, GET /api/manage/v1/settings/server";
221
+ readonly route: "GET /api/manage/v1/settings/render, GET /api/manage/v1/settings/cultures, GET /api/manage/v1/settings/sites, GET /api/manage/v1/settings/nav, GET /api/manage/v1/settings/audit-retention, GET /api/manage/v1/home/news, GET /api/manage/v1/settings/notification-retention, GET /api/manage/v1/settings/server, GET /api/manage/v1/settings/ai-context";
217
222
  }, {
218
223
  readonly action: "settings.update";
219
224
  readonly adminGatedToday: true;
220
225
  readonly label: "Change settings";
221
- readonly route: "PUT /api/manage/v1/settings/render, PUT /api/manage/v1/settings/cultures, PUT /api/manage/v1/settings/nav, PUT /api/manage/v1/settings/notification-retention, PUT /api/manage/v1/settings/server";
226
+ readonly route: "PUT /api/manage/v1/settings/render, PUT /api/manage/v1/settings/cultures, PUT /api/manage/v1/settings/nav, PUT /api/manage/v1/settings/notification-retention, PUT /api/manage/v1/settings/server, PUT /api/manage/v1/settings/ai-context, POST /api/manage/v1/settings/site-reach/reset";
222
227
  }, {
223
228
  readonly action: "sites.manage";
224
229
  readonly adminGatedToday: true;
@@ -244,8 +249,8 @@ export declare const CORE_ACTIONS: readonly [{
244
249
  readonly action: "users.update";
245
250
  readonly adminGatedToday: true;
246
251
  readonly label: "Change user roles";
247
- readonly keyNote: "Changes what a person may do by changing their role. A key is refused the admin role.";
248
- readonly route: "PATCH /api/manage/v1/users/:id/role";
252
+ readonly keyNote: "Changes what a person may do by changing their role, and disables or enables an account. A key is refused the admin role and an administrator's account.";
253
+ readonly route: "PATCH /api/manage/v1/users/:id/role, PATCH /api/manage/v1/users/:id/disabled";
249
254
  }, {
250
255
  readonly action: "users.delete";
251
256
  readonly adminGatedToday: true;
@@ -28,10 +28,13 @@
28
28
  // string. The role editor renders this, the same way CAPABILITY_LABELS
29
29
  // renders capabilities.
30
30
  export const CORE_ACTIONS = [
31
- { action: "content.read", adminGatedToday: false, label: "View content and mint preview links", keyNote: "On the management API this also reads drafts, every saved version and preview links, not only published content.", route: "GET /api/manage/v1/content/by-path, GET /api/manage/v1/content/by-address, GET /api/manage/v1/content/:id, GET /api/manage/v1/content/roots, GET /api/manage/v1/content/:id/children, GET /api/manage/v1/content/:id/list, GET /api/manage/v1/content/:id/url-impact, GET /api/manage/v1/content/:id/move-impact, GET /api/manage/v1/content/:id/versions, GET /api/manage/v1/content/:id/versions/latest, GET /api/manage/v1/content/:id/versions/:version, POST /api/manage/v1/content/:id/preview-token, GET /api/manage/v1/home/drafts, GET /api/manage/v1/home/recent-edits, GET /api/manage/v1/home/published, GET /api/plugins/:pluginId/storage/:contentId/:fieldId" },
31
+ { action: "content.read", adminGatedToday: false, label: "View content and mint preview links", keyNote: "On the management API this also reads drafts, every saved version and preview links, not only published content.", route: "GET /api/manage/v1/content/by-path, GET /api/manage/v1/content/by-address, GET /api/manage/v1/content/:id, GET /api/manage/v1/content/roots, GET /api/manage/v1/content/:id/children, GET /api/manage/v1/content/:id/list, GET /api/manage/v1/content/search, GET /api/manage/v1/content/:id/url-impact, GET /api/manage/v1/content/:id/move-impact, GET /api/manage/v1/content/:id/versions, GET /api/manage/v1/content/:id/versions/latest, GET /api/manage/v1/content/:id/versions/:version, POST /api/manage/v1/content/:id/preview-token, GET /api/manage/v1/home/drafts, GET /api/manage/v1/home/recent-edits, GET /api/manage/v1/home/published, GET /api/plugins/:pluginId/storage/:contentId/:fieldId" },
32
32
  { action: "content.create", adminGatedToday: false, label: "Create and copy content", route: "POST /api/manage/v1/content, POST /api/manage/v1/content/:id/copy" },
33
33
  { action: "content.update", adminGatedToday: false, label: "Edit, move and reorder content", route: "PUT /api/manage/v1/content/:id, POST /api/manage/v1/content/:id/move, POST /api/manage/v1/content/roots/reorder, POST /api/manage/v1/content/:id/children/reorder, PUT /api/plugins/:pluginId/storage/:contentId/:fieldId" },
34
34
  { action: "content.publish", adminGatedToday: false, label: "Publish content", route: "POST /api/manage/v1/content/:id/publish, POST /api/manage/v1/content/:id/publish-all" },
35
+ // M31.5 A (D4): taking a published page off the site. Every version stays and
36
+ // publishing again puts one back. Open to the seeded editor, as publishing is.
37
+ { action: "content.unpublish", adminGatedToday: false, label: "Unpublish content", route: "POST /api/manage/v1/content/:id/unpublish" },
35
38
  { action: "content.delete", adminGatedToday: true, label: "Move content to the trash", route: "DELETE /api/manage/v1/content/:id" },
36
39
  { action: "content.readTrash", adminGatedToday: true, label: "View trashed content", route: "GET /api/manage/v1/content/trash, GET /api/manage/v1/home/trash-count" },
37
40
  { action: "content.restore", adminGatedToday: true, label: "Restore trashed content", route: "POST /api/manage/v1/content/:id/restore" },
@@ -75,8 +78,8 @@ export const CORE_ACTIONS = [
75
78
  { action: "render.preview", adminGatedToday: true, label: "Render a block preview", route: "POST /api/manage/v1/render/block" },
76
79
  // S300a: the app bar's order read in the shell (GET /api/settings/nav) is open to every signed-in user on purpose (S281) and asks no action;
77
80
  // its management read (GET /api/manage/v1/settings/nav, S309) asks settings.read, and its write is settings.update.
78
- { action: "settings.read", adminGatedToday: false, label: "View settings", route: "GET /api/manage/v1/settings/render, GET /api/manage/v1/settings/cultures, GET /api/manage/v1/settings/sites, GET /api/manage/v1/settings/nav, GET /api/manage/v1/settings/audit-retention, GET /api/manage/v1/home/news, GET /api/manage/v1/settings/notification-retention, GET /api/manage/v1/settings/server" },
79
- { action: "settings.update", adminGatedToday: true, label: "Change settings", route: "PUT /api/manage/v1/settings/render, PUT /api/manage/v1/settings/cultures, PUT /api/manage/v1/settings/nav, PUT /api/manage/v1/settings/notification-retention, PUT /api/manage/v1/settings/server" },
81
+ { action: "settings.read", adminGatedToday: false, label: "View settings", route: "GET /api/manage/v1/settings/render, GET /api/manage/v1/settings/cultures, GET /api/manage/v1/settings/sites, GET /api/manage/v1/settings/nav, GET /api/manage/v1/settings/audit-retention, GET /api/manage/v1/home/news, GET /api/manage/v1/settings/notification-retention, GET /api/manage/v1/settings/server, GET /api/manage/v1/settings/ai-context" },
82
+ { action: "settings.update", adminGatedToday: true, label: "Change settings", route: "PUT /api/manage/v1/settings/render, PUT /api/manage/v1/settings/cultures, PUT /api/manage/v1/settings/nav, PUT /api/manage/v1/settings/notification-retention, PUT /api/manage/v1/settings/server, PUT /api/manage/v1/settings/ai-context, POST /api/manage/v1/settings/site-reach/reset" },
80
83
  // S277d: a site's domains and the choice of default site. New with the
81
84
  // Site tab, so there was no earlier gate to read; admin-gated because it
82
85
  // decides which content every address of the install shows.
@@ -87,7 +90,7 @@ export const CORE_ACTIONS = [
87
90
  { action: "sites.read", adminGatedToday: true, label: "View the sites and their addresses", route: "GET /api/v1/sites" },
88
91
  { action: "users.read", adminGatedToday: true, label: "View users", route: "GET /api/manage/v1/users" },
89
92
  { action: "users.create", adminGatedToday: true, label: "Invite users", keyNote: "A key is refused here: creating a user takes a session, so this matters only to a session's role.", route: "POST /api/manage/v1/users" },
90
- { action: "users.update", adminGatedToday: true, label: "Change user roles", keyNote: "Changes what a person may do by changing their role. A key is refused the admin role.", route: "PATCH /api/manage/v1/users/:id/role" },
93
+ { action: "users.update", adminGatedToday: true, label: "Change user roles", keyNote: "Changes what a person may do by changing their role, and disables or enables an account. A key is refused the admin role and an administrator's account.", route: "PATCH /api/manage/v1/users/:id/role, PATCH /api/manage/v1/users/:id/disabled" },
91
94
  { action: "users.delete", adminGatedToday: true, label: "Delete users", keyNote: "Removes a person's account and ends their sessions. A key is refused when the account is an administrator's.", route: "DELETE /api/manage/v1/users/:id" },
92
95
  // S272: new with the role editor, so there was no requireAdmin gate to
93
96
  // read. Marked admin-gated because granting the role editor to the seeded