@kardalum/plugin-sdk 0.0.0-stage → 0.15.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 (312) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/LICENSE +202 -0
  3. package/README.md +70 -2
  4. package/dist/admin-section-registry.d.ts +34 -0
  5. package/dist/admin-section-registry.js +49 -0
  6. package/dist/built-in-serializers.d.ts +3 -0
  7. package/dist/built-in-serializers.js +18 -0
  8. package/dist/built-in-settings-schemas.d.ts +14 -0
  9. package/dist/built-in-settings-schemas.js +225 -0
  10. package/dist/built-in-value-schemas.d.ts +4 -0
  11. package/dist/built-in-value-schemas.js +47 -0
  12. package/dist/built-ins.d.ts +1 -0
  13. package/dist/built-ins.js +257 -0
  14. package/dist/capabilities.d.ts +99 -0
  15. package/dist/capabilities.js +363 -0
  16. package/dist/data-type-plugin.d.ts +28 -0
  17. package/dist/data-type-plugin.js +1 -0
  18. package/dist/datatype-validation.d.ts +26 -0
  19. package/dist/datatype-validation.js +110 -0
  20. package/dist/datatypes-entry.d.ts +4 -0
  21. package/dist/datatypes-entry.js +18 -0
  22. package/dist/define-plugin.d.ts +25 -0
  23. package/dist/define-plugin.js +51 -0
  24. package/dist/entitlement-entry.d.ts +5 -0
  25. package/dist/entitlement-entry.js +24 -0
  26. package/dist/entitlement-gate.d.ts +36 -0
  27. package/dist/entitlement-gate.js +201 -0
  28. package/dist/entitlement-types.d.ts +39 -0
  29. package/dist/entitlement-types.js +1 -0
  30. package/dist/entitlement.d.ts +57 -0
  31. package/dist/entitlement.js +170 -0
  32. package/dist/host-entry.d.ts +1 -0
  33. package/dist/host-entry.js +11 -0
  34. package/dist/icon-name.d.ts +1 -0
  35. package/dist/icon-name.js +1 -0
  36. package/dist/icons.d.ts +2 -0
  37. package/dist/icons.js +10 -0
  38. package/dist/index.d.ts +28 -0
  39. package/dist/index.js +93 -0
  40. package/dist/license-verdict-keys.d.ts +18 -0
  41. package/dist/license-verdict-keys.js +22 -0
  42. package/dist/local-host.d.ts +3 -0
  43. package/dist/local-host.js +38 -0
  44. package/dist/manifest-entry.d.ts +8 -0
  45. package/dist/manifest-entry.js +13 -0
  46. package/dist/manifest-schema.d.ts +408 -0
  47. package/dist/manifest-schema.js +774 -0
  48. package/dist/manifest.d.ts +546 -0
  49. package/dist/manifest.js +86 -0
  50. package/dist/media/media-picker.d.ts +39 -0
  51. package/dist/media/media-picker.js +438 -0
  52. package/dist/media/upload-error.d.ts +12 -0
  53. package/dist/media/upload-error.js +30 -0
  54. package/dist/plugin-context.d.ts +75 -0
  55. package/dist/plugin-context.js +70 -0
  56. package/dist/plugin-screen-context.d.ts +40 -0
  57. package/dist/plugin-screen-context.js +16 -0
  58. package/dist/register-built-ins.d.ts +1 -0
  59. package/dist/register-built-ins.js +41 -0
  60. package/dist/registry.d.ts +4 -0
  61. package/dist/registry.js +17 -0
  62. package/dist/rendition-eligibility.d.ts +24 -0
  63. package/dist/rendition-eligibility.js +40 -0
  64. package/dist/richtext/block-panel.d.ts +27 -0
  65. package/dist/richtext/block-panel.js +232 -0
  66. package/dist/richtext/extensions.d.ts +19 -0
  67. package/dist/richtext/extensions.js +56 -0
  68. package/dist/richtext/insert-menu.d.ts +24 -0
  69. package/dist/richtext/insert-menu.js +142 -0
  70. package/dist/richtext/kardalum-block.d.ts +33 -0
  71. package/dist/richtext/kardalum-block.js +282 -0
  72. package/dist/richtext/style-listbox.d.ts +10 -0
  73. package/dist/richtext/style-listbox.js +69 -0
  74. package/dist/richtext/text-style-class.d.ts +18 -0
  75. package/dist/richtext/text-style-class.js +36 -0
  76. package/dist/simple-storage-value-provider.d.ts +9 -0
  77. package/dist/simple-storage-value-provider.js +96 -0
  78. package/dist/structured-storage-types.d.ts +61 -0
  79. package/dist/structured-storage-types.js +11 -0
  80. package/dist/tailwind.d.ts +1 -0
  81. package/dist/tailwind.js +5 -0
  82. package/dist/tokens/system-dark.css +75 -0
  83. package/dist/tokens/tokens.css +239 -0
  84. package/dist/tokens/tokens.json +212 -0
  85. package/dist/tokens.d.ts +1 -0
  86. package/dist/tokens.js +11 -0
  87. package/dist/ui-entry.d.ts +5 -0
  88. package/dist/ui-entry.js +42 -0
  89. package/dist/views/content-list-preview.d.ts +1 -0
  90. package/dist/views/content-list-preview.js +14 -0
  91. package/dist/views/content-list-settings-view.d.ts +1 -0
  92. package/dist/views/content-list-settings-view.js +97 -0
  93. package/dist/views/content-list-view.d.ts +19 -0
  94. package/dist/views/content-list-view.js +248 -0
  95. package/dist/views/crop-view.d.ts +55 -0
  96. package/dist/views/crop-view.js +161 -0
  97. package/dist/views/date-range-view.d.ts +6 -0
  98. package/dist/views/date-range-view.js +55 -0
  99. package/dist/views/file-upload-view.d.ts +43 -0
  100. package/dist/views/file-upload-view.js +104 -0
  101. package/dist/views/html-code-editor.d.ts +10 -0
  102. package/dist/views/html-code-editor.js +101 -0
  103. package/dist/views/html-view.d.ts +3 -0
  104. package/dist/views/html-view.js +53 -0
  105. package/dist/views/image-view.d.ts +3 -0
  106. package/dist/views/image-view.js +387 -0
  107. package/dist/views/rich-text-view.d.ts +2 -0
  108. package/dist/views/rich-text-view.js +429 -0
  109. package/node_modules/@kardalum/api-schemas/LICENSE +202 -0
  110. package/node_modules/@kardalum/api-schemas/README.md +56 -0
  111. package/node_modules/@kardalum/api-schemas/dist/action.schema.d.ts +30 -0
  112. package/node_modules/@kardalum/api-schemas/dist/action.schema.js +88 -0
  113. package/node_modules/@kardalum/api-schemas/dist/api-error.schema.d.ts +5 -0
  114. package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +6 -0
  115. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +75 -0
  116. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +36 -0
  117. package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.d.ts +89 -0
  118. package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +60 -0
  119. package/node_modules/@kardalum/api-schemas/dist/asset.schema.d.ts +24 -0
  120. package/node_modules/@kardalum/api-schemas/dist/asset.schema.js +47 -0
  121. package/node_modules/@kardalum/api-schemas/dist/auth.schema.d.ts +38 -0
  122. package/node_modules/@kardalum/api-schemas/dist/auth.schema.js +38 -0
  123. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +537 -0
  124. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +353 -0
  125. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +158 -0
  126. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +139 -0
  127. package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +125 -0
  128. package/node_modules/@kardalum/api-schemas/dist/content-path.js +256 -0
  129. package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.d.ts +20 -0
  130. package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +23 -0
  131. package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.d.ts +151 -0
  132. package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +82 -0
  133. package/node_modules/@kardalum/api-schemas/dist/content-version.schema.d.ts +18 -0
  134. package/node_modules/@kardalum/api-schemas/dist/content-version.schema.js +22 -0
  135. package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +17 -0
  136. package/node_modules/@kardalum/api-schemas/dist/content.schema.js +20 -0
  137. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +302 -0
  138. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +97 -0
  139. package/node_modules/@kardalum/api-schemas/dist/culture-direction.d.ts +1 -0
  140. package/node_modules/@kardalum/api-schemas/dist/culture-direction.js +9 -0
  141. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +36 -0
  142. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +32 -0
  143. package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.d.ts +9 -0
  144. package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +32 -0
  145. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +296 -0
  146. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +138 -0
  147. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +121 -0
  148. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +147 -0
  149. package/node_modules/@kardalum/api-schemas/dist/health.schema.d.ts +6 -0
  150. package/node_modules/@kardalum/api-schemas/dist/health.schema.js +5 -0
  151. package/node_modules/@kardalum/api-schemas/dist/html-entities.d.ts +4 -0
  152. package/node_modules/@kardalum/api-schemas/dist/html-entities.js +250 -0
  153. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +102 -0
  154. package/node_modules/@kardalum/api-schemas/dist/index.js +58 -0
  155. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +15 -0
  156. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +14 -0
  157. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +381 -0
  158. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +197 -0
  159. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +167 -0
  160. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +214 -0
  161. package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +77 -0
  162. package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.js +53 -0
  163. package/node_modules/@kardalum/api-schemas/dist/media-reference-use.d.ts +75 -0
  164. package/node_modules/@kardalum/api-schemas/dist/media-reference-use.js +117 -0
  165. package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +27 -0
  166. package/node_modules/@kardalum/api-schemas/dist/media-reference.js +279 -0
  167. package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.d.ts +74 -0
  168. package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.js +157 -0
  169. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +80 -0
  170. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +156 -0
  171. package/node_modules/@kardalum/api-schemas/dist/nav.schema.d.ts +23 -0
  172. package/node_modules/@kardalum/api-schemas/dist/nav.schema.js +55 -0
  173. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +846 -0
  174. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +356 -0
  175. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +20 -0
  176. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +27 -0
  177. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +169 -0
  178. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.js +80 -0
  179. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.d.ts +65 -0
  180. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.js +889 -0
  181. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +89 -0
  182. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +134 -0
  183. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +31 -0
  184. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +38 -0
  185. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +369 -0
  186. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +393 -0
  187. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +22 -0
  188. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +87 -0
  189. package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.d.ts +31 -0
  190. package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +25 -0
  191. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +15 -0
  192. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +24 -0
  193. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +306 -0
  194. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +328 -0
  195. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +79 -0
  196. package/node_modules/@kardalum/api-schemas/dist/render-editing.js +50 -0
  197. package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.d.ts +9 -0
  198. package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.js +13 -0
  199. package/node_modules/@kardalum/api-schemas/dist/reserved-slugs.d.ts +2 -0
  200. package/node_modules/@kardalum/api-schemas/dist/reserved-slugs.js +16 -0
  201. package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +90 -0
  202. package/node_modules/@kardalum/api-schemas/dist/role.schema.js +69 -0
  203. package/node_modules/@kardalum/api-schemas/dist/sample-content-outcome.schema.d.ts +17 -0
  204. package/node_modules/@kardalum/api-schemas/dist/sample-content-outcome.schema.js +27 -0
  205. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +108 -0
  206. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +93 -0
  207. package/node_modules/@kardalum/api-schemas/dist/sites.schema.d.ts +243 -0
  208. package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +296 -0
  209. package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +43 -0
  210. package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +25 -0
  211. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +30 -0
  212. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.js +19 -0
  213. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +112 -0
  214. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +74 -0
  215. package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +41 -0
  216. package/node_modules/@kardalum/api-schemas/dist/template.schema.js +39 -0
  217. package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.d.ts +21 -0
  218. package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.js +14 -0
  219. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +89 -0
  220. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +68 -0
  221. package/node_modules/@kardalum/api-schemas/package.json +35 -0
  222. package/node_modules/@kardalum/design-tokens/LICENSE +202 -0
  223. package/node_modules/@kardalum/design-tokens/README.md +29 -0
  224. package/node_modules/@kardalum/design-tokens/dist/build-css.d.ts +32 -0
  225. package/node_modules/@kardalum/design-tokens/dist/build-css.js +88 -0
  226. package/node_modules/@kardalum/design-tokens/dist/generate.d.ts +1 -0
  227. package/node_modules/@kardalum/design-tokens/dist/generate.js +18 -0
  228. package/node_modules/@kardalum/design-tokens/dist/index.d.ts +6 -0
  229. package/node_modules/@kardalum/design-tokens/dist/index.js +4 -0
  230. package/node_modules/@kardalum/design-tokens/dist/system-dark.css +75 -0
  231. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +33 -0
  232. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +54 -0
  233. package/node_modules/@kardalum/design-tokens/dist/theme-css.d.ts +12 -0
  234. package/node_modules/@kardalum/design-tokens/dist/theme-css.js +42 -0
  235. package/node_modules/@kardalum/design-tokens/dist/theme-types.d.ts +43 -0
  236. package/node_modules/@kardalum/design-tokens/dist/theme-types.js +1 -0
  237. package/node_modules/@kardalum/design-tokens/dist/themes/dark.d.ts +13 -0
  238. package/node_modules/@kardalum/design-tokens/dist/themes/dark.js +120 -0
  239. package/node_modules/@kardalum/design-tokens/dist/themes/index.d.ts +5 -0
  240. package/node_modules/@kardalum/design-tokens/dist/themes/index.js +4 -0
  241. package/node_modules/@kardalum/design-tokens/dist/themes/light.d.ts +9 -0
  242. package/node_modules/@kardalum/design-tokens/dist/themes/light.js +13 -0
  243. package/node_modules/@kardalum/design-tokens/dist/tokens.css +239 -0
  244. package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +25 -0
  245. package/node_modules/@kardalum/design-tokens/dist/tokens.js +276 -0
  246. package/node_modules/@kardalum/design-tokens/dist/tokens.json +212 -0
  247. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +91 -0
  248. package/node_modules/@kardalum/design-tokens/dist/types.js +5 -0
  249. package/node_modules/@kardalum/design-tokens/package.json +42 -0
  250. package/node_modules/@kardalum/plugin-package/LICENSE +202 -0
  251. package/node_modules/@kardalum/plugin-package/README.md +71 -0
  252. package/node_modules/@kardalum/plugin-package/dist/docs-contract.d.ts +50 -0
  253. package/node_modules/@kardalum/plugin-package/dist/docs-contract.js +659 -0
  254. package/node_modules/@kardalum/plugin-package/dist/envelope.d.ts +19 -0
  255. package/node_modules/@kardalum/plugin-package/dist/envelope.js +104 -0
  256. package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +37 -0
  257. package/node_modules/@kardalum/plugin-package/dist/extract.js +199 -0
  258. package/node_modules/@kardalum/plugin-package/dist/hash.d.ts +17 -0
  259. package/node_modules/@kardalum/plugin-package/dist/hash.js +69 -0
  260. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +11 -0
  261. package/node_modules/@kardalum/plugin-package/dist/index.js +7 -0
  262. package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +185 -0
  263. package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +236 -0
  264. package/node_modules/@kardalum/plugin-package/dist/package-contract.d.ts +50 -0
  265. package/node_modules/@kardalum/plugin-package/dist/package-contract.js +115 -0
  266. package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +1 -0
  267. package/node_modules/@kardalum/plugin-package/dist/sample-content.js +17 -0
  268. package/node_modules/@kardalum/plugin-package/dist/types.d.ts +45 -0
  269. package/node_modules/@kardalum/plugin-package/dist/types.js +1 -0
  270. package/node_modules/@kardalum/plugin-package/package.json +49 -0
  271. package/node_modules/@kardalum/ui/LICENSE +202 -0
  272. package/node_modules/@kardalum/ui/README.md +35 -0
  273. package/node_modules/@kardalum/ui/dist/components/alert-dialog.d.ts +14 -0
  274. package/node_modules/@kardalum/ui/dist/components/alert-dialog.js +38 -0
  275. package/node_modules/@kardalum/ui/dist/components/badge.d.ts +9 -0
  276. package/node_modules/@kardalum/ui/dist/components/badge.js +30 -0
  277. package/node_modules/@kardalum/ui/dist/components/button.d.ts +11 -0
  278. package/node_modules/@kardalum/ui/dist/components/button.js +37 -0
  279. package/node_modules/@kardalum/ui/dist/components/checkbox.d.ts +5 -0
  280. package/node_modules/@kardalum/ui/dist/components/checkbox.js +7 -0
  281. package/node_modules/@kardalum/ui/dist/components/dialog.d.ts +17 -0
  282. package/node_modules/@kardalum/ui/dist/components/dialog.js +48 -0
  283. package/node_modules/@kardalum/ui/dist/components/dropdown-menu.d.ts +18 -0
  284. package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +53 -0
  285. package/node_modules/@kardalum/ui/dist/components/empty-state.d.ts +30 -0
  286. package/node_modules/@kardalum/ui/dist/components/empty-state.js +9 -0
  287. package/node_modules/@kardalum/ui/dist/components/input.d.ts +4 -0
  288. package/node_modules/@kardalum/ui/dist/components/input.js +6 -0
  289. package/node_modules/@kardalum/ui/dist/components/panel.d.ts +5 -0
  290. package/node_modules/@kardalum/ui/dist/components/panel.js +6 -0
  291. package/node_modules/@kardalum/ui/dist/components/property-field.d.ts +19 -0
  292. package/node_modules/@kardalum/ui/dist/components/property-field.js +86 -0
  293. package/node_modules/@kardalum/ui/dist/components/sheet.d.ts +17 -0
  294. package/node_modules/@kardalum/ui/dist/components/sheet.js +55 -0
  295. package/node_modules/@kardalum/ui/dist/components/skeleton.d.ts +3 -0
  296. package/node_modules/@kardalum/ui/dist/components/skeleton.js +9 -0
  297. package/node_modules/@kardalum/ui/dist/components/switch.d.ts +5 -0
  298. package/node_modules/@kardalum/ui/dist/components/switch.js +7 -0
  299. package/node_modules/@kardalum/ui/dist/components/tab-strip.d.ts +34 -0
  300. package/node_modules/@kardalum/ui/dist/components/tab-strip.js +72 -0
  301. package/node_modules/@kardalum/ui/dist/components/toast.d.ts +18 -0
  302. package/node_modules/@kardalum/ui/dist/components/toast.js +42 -0
  303. package/node_modules/@kardalum/ui/dist/components/toaster.d.ts +12 -0
  304. package/node_modules/@kardalum/ui/dist/components/toaster.js +11 -0
  305. package/node_modules/@kardalum/ui/dist/components/use-toast.d.ts +17 -0
  306. package/node_modules/@kardalum/ui/dist/components/use-toast.js +62 -0
  307. package/node_modules/@kardalum/ui/dist/index.d.ts +18 -0
  308. package/node_modules/@kardalum/ui/dist/index.js +18 -0
  309. package/node_modules/@kardalum/ui/dist/lib/cn.d.ts +2 -0
  310. package/node_modules/@kardalum/ui/dist/lib/cn.js +5 -0
  311. package/node_modules/@kardalum/ui/package.json +63 -0
  312. package/package.json +146 -4
@@ -0,0 +1,846 @@
1
+ import { z } from "zod";
2
+ /** The five actions a node can be restricted for. Each is also a core action
3
+ * (the test pins that), so the vocabulary cannot drift from the roles. */
4
+ export declare const RESTRICTABLE_ACTIONS: readonly ["content.read", "content.create", "content.update", "content.publish", "content.delete"];
5
+ export type RestrictableAction = (typeof RESTRICTABLE_ACTIONS)[number];
6
+ export declare function isRestrictableAction(action: string): action is RestrictableAction;
7
+ /** Bounds, so a decision never walks or loads an unbounded set. */
8
+ export declare const MAX_RESTRICTED_NODES = 1000;
9
+ /** The same count with the trash: how many nodes, live or trashed, may carry
10
+ * an entry. The entries of trashed nodes restrict nothing a user can reach
11
+ * and are not counted by MAX_RESTRICTED_NODES, but every content request
12
+ * still loads them, so this is the constant that bounds that load: 1,250
13
+ * nodes of five actions each keeps the worst load of one request under the
14
+ * 200 ms the node access bench stops at (apps/server/perf/node-access-bound.ts). */
15
+ export declare const MAX_RESTRICTED_NODES_WITH_TRASH = 1250;
16
+ export declare const MAX_GRANTS_PER_ENTRY = 50;
17
+ /** The longest role id or user id a grant can name. */
18
+ export declare const NODE_ACCESS_SUBJECT_ID_MAX = 191;
19
+ export declare const NodeAccessModeSchema: z.ZodEnum<{
20
+ restricted: "restricted";
21
+ open: "open";
22
+ }>;
23
+ export type NodeAccessMode = z.infer<typeof NodeAccessModeSchema>;
24
+ export declare const NodeAccessSubjectKindSchema: z.ZodEnum<{
25
+ role: "role";
26
+ user: "user";
27
+ }>;
28
+ export type NodeAccessSubjectKind = z.infer<typeof NodeAccessSubjectKindSchema>;
29
+ export declare const NodeAccessGrantSchema: z.ZodObject<{
30
+ subjectKind: z.ZodEnum<{
31
+ role: "role";
32
+ user: "user";
33
+ }>;
34
+ subjectId: z.ZodString;
35
+ }, z.core.$strip>;
36
+ export type NodeAccessGrant = z.infer<typeof NodeAccessGrantSchema>;
37
+ /** One node's entry for one action. An open entry never has grants. */
38
+ export declare const NodeAccessEntrySchema: z.ZodObject<{
39
+ action: z.ZodEnum<{
40
+ "content.read": "content.read";
41
+ "content.create": "content.create";
42
+ "content.update": "content.update";
43
+ "content.publish": "content.publish";
44
+ "content.delete": "content.delete";
45
+ }>;
46
+ mode: z.ZodEnum<{
47
+ restricted: "restricted";
48
+ open: "open";
49
+ }>;
50
+ grants: z.ZodArray<z.ZodObject<{
51
+ subjectKind: z.ZodEnum<{
52
+ role: "role";
53
+ user: "user";
54
+ }>;
55
+ subjectId: z.ZodString;
56
+ }, z.core.$strip>>;
57
+ }, z.core.$strip>;
58
+ export type NodeAccessEntry = z.infer<typeof NodeAccessEntrySchema>;
59
+ export declare const NodeAccessReasonSchema: z.ZodEnum<{
60
+ admin: "admin";
61
+ "role-lacks-action": "role-lacks-action";
62
+ unrestricted: "unrestricted";
63
+ reopened: "reopened";
64
+ granted: "granted";
65
+ "not-granted": "not-granted";
66
+ }>;
67
+ export type NodeAccessReason = z.infer<typeof NodeAccessReasonSchema>;
68
+ export declare const NodeAccessDecisionSchema: z.ZodObject<{
69
+ allowed: z.ZodBoolean;
70
+ reason: z.ZodEnum<{
71
+ admin: "admin";
72
+ "role-lacks-action": "role-lacks-action";
73
+ unrestricted: "unrestricted";
74
+ reopened: "reopened";
75
+ granted: "granted";
76
+ "not-granted": "not-granted";
77
+ }>;
78
+ decidedAt: z.ZodOptional<z.ZodObject<{
79
+ nodeId: z.ZodString;
80
+ path: z.ZodString;
81
+ }, z.core.$strip>>;
82
+ via: z.ZodOptional<z.ZodObject<{
83
+ subjectKind: z.ZodEnum<{
84
+ role: "role";
85
+ user: "user";
86
+ }>;
87
+ subjectId: z.ZodString;
88
+ }, z.core.$strip>>;
89
+ }, z.core.$strip>;
90
+ export type NodeAccessDecision = z.infer<typeof NodeAccessDecisionSchema>;
91
+ export declare const NODE_ACCESS_REFUSED_MESSAGE = "You do not have access to this content";
92
+ /** A grant of a deciding entry as a sentence names it: the role label (the id
93
+ * when the role is gone), or the user's display name. A user's email is never
94
+ * sent here: a user with no name, or one that is gone, has a null label, and
95
+ * a screen says "a user". */
96
+ export declare const DecidingEntryGrantSchema: z.ZodObject<{
97
+ subjectKind: z.ZodEnum<{
98
+ role: "role";
99
+ user: "user";
100
+ }>;
101
+ subjectId: z.ZodString;
102
+ label: z.ZodNullable<z.ZodString>;
103
+ }, z.core.$strip>;
104
+ export type DecidingEntryGrant = z.infer<typeof DecidingEntryGrantSchema>;
105
+ /** The entry that decided, or that a node inherits: the node it is on, its
106
+ * mode and its grants, labelled. `path` and `name` are null when the subject
107
+ * may not read that node (A2, D6): its id is all that is said of it. */
108
+ export declare const DecidingEntrySchema: z.ZodObject<{
109
+ nodeId: z.ZodString;
110
+ path: z.ZodNullable<z.ZodString>;
111
+ name: z.ZodNullable<z.ZodString>;
112
+ mode: z.ZodEnum<{
113
+ restricted: "restricted";
114
+ open: "open";
115
+ }>;
116
+ grants: z.ZodArray<z.ZodObject<{
117
+ subjectKind: z.ZodEnum<{
118
+ role: "role";
119
+ user: "user";
120
+ }>;
121
+ subjectId: z.ZodString;
122
+ label: z.ZodNullable<z.ZodString>;
123
+ }, z.core.$strip>>;
124
+ }, z.core.$strip>;
125
+ export type DecidingEntry = z.infer<typeof DecidingEntrySchema>;
126
+ /** Why one action is refused on a row: a restriction that does not name the
127
+ * subject (`decidedAt` is its entry), or a role that lacks the action
128
+ * (`decidedAt` is null: no node decided it). */
129
+ export declare const NodeAccessDenialSchema: z.ZodObject<{
130
+ reason: z.ZodEnum<{
131
+ "role-lacks-action": "role-lacks-action";
132
+ "not-granted": "not-granted";
133
+ }>;
134
+ decidedAt: z.ZodNullable<z.ZodObject<{
135
+ nodeId: z.ZodString;
136
+ path: z.ZodNullable<z.ZodString>;
137
+ name: z.ZodNullable<z.ZodString>;
138
+ mode: z.ZodEnum<{
139
+ restricted: "restricted";
140
+ open: "open";
141
+ }>;
142
+ grants: z.ZodArray<z.ZodObject<{
143
+ subjectKind: z.ZodEnum<{
144
+ role: "role";
145
+ user: "user";
146
+ }>;
147
+ subjectId: z.ZodString;
148
+ label: z.ZodNullable<z.ZodString>;
149
+ }, z.core.$strip>>;
150
+ }, z.core.$strip>>;
151
+ }, z.core.$strip>;
152
+ export type NodeAccessDenial = z.infer<typeof NodeAccessDenialSchema>;
153
+ /** The node decision for each restrictable action, for the subject making the
154
+ * request. `create` is creating a child under the node. `denied` has one key
155
+ * per false flag, saying why; an action that is allowed has no key. */
156
+ export declare const NodeAccessFlagsSchema: z.ZodObject<{
157
+ read: z.ZodBoolean;
158
+ create: z.ZodBoolean;
159
+ update: z.ZodBoolean;
160
+ publish: z.ZodBoolean;
161
+ delete: z.ZodBoolean;
162
+ denied: z.ZodRecord<z.ZodEnum<{
163
+ "content.read": "content.read";
164
+ "content.create": "content.create";
165
+ "content.update": "content.update";
166
+ "content.publish": "content.publish";
167
+ "content.delete": "content.delete";
168
+ }> & z.core.$partial, z.ZodObject<{
169
+ reason: z.ZodEnum<{
170
+ "role-lacks-action": "role-lacks-action";
171
+ "not-granted": "not-granted";
172
+ }>;
173
+ decidedAt: z.ZodNullable<z.ZodObject<{
174
+ nodeId: z.ZodString;
175
+ path: z.ZodNullable<z.ZodString>;
176
+ name: z.ZodNullable<z.ZodString>;
177
+ mode: z.ZodEnum<{
178
+ restricted: "restricted";
179
+ open: "open";
180
+ }>;
181
+ grants: z.ZodArray<z.ZodObject<{
182
+ subjectKind: z.ZodEnum<{
183
+ role: "role";
184
+ user: "user";
185
+ }>;
186
+ subjectId: z.ZodString;
187
+ label: z.ZodNullable<z.ZodString>;
188
+ }, z.core.$strip>>;
189
+ }, z.core.$strip>>;
190
+ }, z.core.$strip>>;
191
+ }, z.core.$strip>;
192
+ export type NodeAccessFlags = z.infer<typeof NodeAccessFlagsSchema>;
193
+ /** The decision a refusal body carries: its reason, and where it was decided
194
+ * as a labelled entry (null when no node decided it, which is a role that
195
+ * lacks the action). */
196
+ export declare const NodeAccessRefusalDecisionSchema: z.ZodObject<{
197
+ allowed: z.ZodBoolean;
198
+ reason: z.ZodEnum<{
199
+ admin: "admin";
200
+ "role-lacks-action": "role-lacks-action";
201
+ unrestricted: "unrestricted";
202
+ reopened: "reopened";
203
+ granted: "granted";
204
+ "not-granted": "not-granted";
205
+ }>;
206
+ decidedAt: z.ZodNullable<z.ZodObject<{
207
+ nodeId: z.ZodString;
208
+ path: z.ZodNullable<z.ZodString>;
209
+ name: z.ZodNullable<z.ZodString>;
210
+ mode: z.ZodEnum<{
211
+ restricted: "restricted";
212
+ open: "open";
213
+ }>;
214
+ grants: z.ZodArray<z.ZodObject<{
215
+ subjectKind: z.ZodEnum<{
216
+ role: "role";
217
+ user: "user";
218
+ }>;
219
+ subjectId: z.ZodString;
220
+ label: z.ZodNullable<z.ZodString>;
221
+ }, z.core.$strip>>;
222
+ }, z.core.$strip>>;
223
+ }, z.core.$strip>;
224
+ export type NodeAccessRefusalDecision = z.infer<typeof NodeAccessRefusalDecisionSchema>;
225
+ /** The body of a 403 that a node decision caused. `action` is the one that was refused. */
226
+ export declare const NodeAccessRefusalSchema: z.ZodObject<{
227
+ message: z.ZodString;
228
+ action: z.ZodEnum<{
229
+ "content.read": "content.read";
230
+ "content.create": "content.create";
231
+ "content.update": "content.update";
232
+ "content.publish": "content.publish";
233
+ "content.delete": "content.delete";
234
+ }>;
235
+ access: z.ZodObject<{
236
+ allowed: z.ZodBoolean;
237
+ reason: z.ZodEnum<{
238
+ admin: "admin";
239
+ "role-lacks-action": "role-lacks-action";
240
+ unrestricted: "unrestricted";
241
+ reopened: "reopened";
242
+ granted: "granted";
243
+ "not-granted": "not-granted";
244
+ }>;
245
+ decidedAt: z.ZodNullable<z.ZodObject<{
246
+ nodeId: z.ZodString;
247
+ path: z.ZodNullable<z.ZodString>;
248
+ name: z.ZodNullable<z.ZodString>;
249
+ mode: z.ZodEnum<{
250
+ restricted: "restricted";
251
+ open: "open";
252
+ }>;
253
+ grants: z.ZodArray<z.ZodObject<{
254
+ subjectKind: z.ZodEnum<{
255
+ role: "role";
256
+ user: "user";
257
+ }>;
258
+ subjectId: z.ZodString;
259
+ label: z.ZodNullable<z.ZodString>;
260
+ }, z.core.$strip>>;
261
+ }, z.core.$strip>>;
262
+ }, z.core.$strip>;
263
+ }, z.core.$strip>;
264
+ export type NodeAccessRefusal = z.infer<typeof NodeAccessRefusalSchema>;
265
+ /** A content route's 403: a node refusal, or the role gate's plain error. The
266
+ * refusal is listed first so it is the one a body with `access` serialises as
267
+ * (a plain object schema would strip `access`). */
268
+ export declare const ContentForbiddenSchema: z.ZodUnion<readonly [z.ZodObject<{
269
+ message: z.ZodString;
270
+ action: z.ZodEnum<{
271
+ "content.read": "content.read";
272
+ "content.create": "content.create";
273
+ "content.update": "content.update";
274
+ "content.publish": "content.publish";
275
+ "content.delete": "content.delete";
276
+ }>;
277
+ access: z.ZodObject<{
278
+ allowed: z.ZodBoolean;
279
+ reason: z.ZodEnum<{
280
+ admin: "admin";
281
+ "role-lacks-action": "role-lacks-action";
282
+ unrestricted: "unrestricted";
283
+ reopened: "reopened";
284
+ granted: "granted";
285
+ "not-granted": "not-granted";
286
+ }>;
287
+ decidedAt: z.ZodNullable<z.ZodObject<{
288
+ nodeId: z.ZodString;
289
+ path: z.ZodNullable<z.ZodString>;
290
+ name: z.ZodNullable<z.ZodString>;
291
+ mode: z.ZodEnum<{
292
+ restricted: "restricted";
293
+ open: "open";
294
+ }>;
295
+ grants: z.ZodArray<z.ZodObject<{
296
+ subjectKind: z.ZodEnum<{
297
+ role: "role";
298
+ user: "user";
299
+ }>;
300
+ subjectId: z.ZodString;
301
+ label: z.ZodNullable<z.ZodString>;
302
+ }, z.core.$strip>>;
303
+ }, z.core.$strip>>;
304
+ }, z.core.$strip>;
305
+ }, z.core.$strip>, z.ZodObject<{
306
+ message: z.ZodString;
307
+ }, z.core.$strip>]>;
308
+ /** Every flag true and nothing denied: what the admin role gets, and what a
309
+ * row has when nothing is restricted. */
310
+ export declare const ALL_NODE_ACCESS: NodeAccessFlags;
311
+ /** The key of one of the five flags (every key of the flags but `denied`). */
312
+ export type NodeAccessFlagKey = Exclude<keyof NodeAccessFlags, "denied">;
313
+ /** The flag key for a restrictable action: "content.read" gives "read". */
314
+ export declare function nodeAccessFlagKey(action: RestrictableAction): NodeAccessFlagKey;
315
+ /** A grant as the tab shows it: who it names, and whether that role or user still exists. */
316
+ export declare const PermissionGrantViewSchema: z.ZodObject<{
317
+ subjectKind: z.ZodEnum<{
318
+ role: "role";
319
+ user: "user";
320
+ }>;
321
+ subjectId: z.ZodString;
322
+ label: z.ZodString;
323
+ detail: z.ZodNullable<z.ZodString>;
324
+ exists: z.ZodBoolean;
325
+ }, z.core.$strip>;
326
+ export type PermissionGrantView = z.infer<typeof PermissionGrantViewSchema>;
327
+ /** One action of one node: its own entry, and what it inherits. */
328
+ export declare const NodePermissionRowSchema: z.ZodObject<{
329
+ action: z.ZodEnum<{
330
+ "content.read": "content.read";
331
+ "content.create": "content.create";
332
+ "content.update": "content.update";
333
+ "content.publish": "content.publish";
334
+ "content.delete": "content.delete";
335
+ }>;
336
+ own: z.ZodNullable<z.ZodObject<{
337
+ mode: z.ZodEnum<{
338
+ restricted: "restricted";
339
+ open: "open";
340
+ }>;
341
+ grants: z.ZodArray<z.ZodObject<{
342
+ subjectKind: z.ZodEnum<{
343
+ role: "role";
344
+ user: "user";
345
+ }>;
346
+ subjectId: z.ZodString;
347
+ label: z.ZodString;
348
+ detail: z.ZodNullable<z.ZodString>;
349
+ exists: z.ZodBoolean;
350
+ }, z.core.$strip>>;
351
+ stale: z.ZodBoolean;
352
+ }, z.core.$strip>>;
353
+ inherited: z.ZodNullable<z.ZodObject<{
354
+ nodeId: z.ZodString;
355
+ path: z.ZodString;
356
+ name: z.ZodString;
357
+ grants: z.ZodArray<z.ZodObject<{
358
+ subjectKind: z.ZodEnum<{
359
+ role: "role";
360
+ user: "user";
361
+ }>;
362
+ subjectId: z.ZodString;
363
+ label: z.ZodString;
364
+ detail: z.ZodNullable<z.ZodString>;
365
+ exists: z.ZodBoolean;
366
+ }, z.core.$strip>>;
367
+ }, z.core.$strip>>;
368
+ locked: z.ZodBoolean;
369
+ }, z.core.$strip>;
370
+ export type NodePermissionRow = z.infer<typeof NodePermissionRowSchema>;
371
+ /** The five rows, in the order of RESTRICTABLE_ACTIONS. */
372
+ export declare const NodePermissionsResponseSchema: z.ZodObject<{
373
+ nodeId: z.ZodString;
374
+ rows: z.ZodArray<z.ZodObject<{
375
+ action: z.ZodEnum<{
376
+ "content.read": "content.read";
377
+ "content.create": "content.create";
378
+ "content.update": "content.update";
379
+ "content.publish": "content.publish";
380
+ "content.delete": "content.delete";
381
+ }>;
382
+ own: z.ZodNullable<z.ZodObject<{
383
+ mode: z.ZodEnum<{
384
+ restricted: "restricted";
385
+ open: "open";
386
+ }>;
387
+ grants: z.ZodArray<z.ZodObject<{
388
+ subjectKind: z.ZodEnum<{
389
+ role: "role";
390
+ user: "user";
391
+ }>;
392
+ subjectId: z.ZodString;
393
+ label: z.ZodString;
394
+ detail: z.ZodNullable<z.ZodString>;
395
+ exists: z.ZodBoolean;
396
+ }, z.core.$strip>>;
397
+ stale: z.ZodBoolean;
398
+ }, z.core.$strip>>;
399
+ inherited: z.ZodNullable<z.ZodObject<{
400
+ nodeId: z.ZodString;
401
+ path: z.ZodString;
402
+ name: z.ZodString;
403
+ grants: z.ZodArray<z.ZodObject<{
404
+ subjectKind: z.ZodEnum<{
405
+ role: "role";
406
+ user: "user";
407
+ }>;
408
+ subjectId: z.ZodString;
409
+ label: z.ZodString;
410
+ detail: z.ZodNullable<z.ZodString>;
411
+ exists: z.ZodBoolean;
412
+ }, z.core.$strip>>;
413
+ }, z.core.$strip>>;
414
+ locked: z.ZodBoolean;
415
+ }, z.core.$strip>>;
416
+ }, z.core.$strip>;
417
+ export type NodePermissionsResponse = z.infer<typeof NodePermissionsResponseSchema>;
418
+ /** One action as the tab saves it: null for no entry on this node. */
419
+ export declare const NodePermissionInputSchema: z.ZodObject<{
420
+ action: z.ZodEnum<{
421
+ "content.read": "content.read";
422
+ "content.create": "content.create";
423
+ "content.update": "content.update";
424
+ "content.publish": "content.publish";
425
+ "content.delete": "content.delete";
426
+ }>;
427
+ entry: z.ZodNullable<z.ZodObject<{
428
+ mode: z.ZodEnum<{
429
+ restricted: "restricted";
430
+ open: "open";
431
+ }>;
432
+ grants: z.ZodArray<z.ZodObject<{
433
+ subjectKind: z.ZodEnum<{
434
+ role: "role";
435
+ user: "user";
436
+ }>;
437
+ subjectId: z.ZodString;
438
+ }, z.core.$strip>>;
439
+ }, z.core.$strip>>;
440
+ }, z.core.$strip>;
441
+ export type NodePermissionInput = z.infer<typeof NodePermissionInputSchema>;
442
+ /** The whole save: each of the five actions exactly once, in any order. */
443
+ export declare const SaveNodePermissionsRequestSchema: z.ZodObject<{
444
+ rows: z.ZodArray<z.ZodObject<{
445
+ action: z.ZodEnum<{
446
+ "content.read": "content.read";
447
+ "content.create": "content.create";
448
+ "content.update": "content.update";
449
+ "content.publish": "content.publish";
450
+ "content.delete": "content.delete";
451
+ }>;
452
+ entry: z.ZodNullable<z.ZodObject<{
453
+ mode: z.ZodEnum<{
454
+ restricted: "restricted";
455
+ open: "open";
456
+ }>;
457
+ grants: z.ZodArray<z.ZodObject<{
458
+ subjectKind: z.ZodEnum<{
459
+ role: "role";
460
+ user: "user";
461
+ }>;
462
+ subjectId: z.ZodString;
463
+ }, z.core.$strip>>;
464
+ }, z.core.$strip>>;
465
+ }, z.core.$strip>>;
466
+ }, z.core.$strip>;
467
+ export type SaveNodePermissionsRequest = z.infer<typeof SaveNodePermissionsRequestSchema>;
468
+ /** The body of a save the server refused. `action` is the row at fault, when
469
+ * one is. `reason` is what a screen words the refusal by in its own
470
+ * language; `message` is the same in English, for a reader without one.
471
+ * `limit` is the limit of live pages with restrictions, `limit-with-trash`
472
+ * the one that counts the trash too: what frees a place differs. */
473
+ export declare const NodePermissionsRefusalSchema: z.ZodObject<{
474
+ message: z.ZodString;
475
+ reason: z.ZodEnum<{
476
+ limit: "limit";
477
+ "unknown-subject": "unknown-subject";
478
+ "nothing-to-reopen": "nothing-to-reopen";
479
+ "limit-with-trash": "limit-with-trash";
480
+ "self-lockout": "self-lockout";
481
+ "row-locked": "row-locked";
482
+ }>;
483
+ action: z.ZodNullable<z.ZodEnum<{
484
+ "content.read": "content.read";
485
+ "content.create": "content.create";
486
+ "content.update": "content.update";
487
+ "content.publish": "content.publish";
488
+ "content.delete": "content.delete";
489
+ }>>;
490
+ }, z.core.$strip>;
491
+ export type NodePermissionsRefusal = z.infer<typeof NodePermissionsRefusalSchema>;
492
+ /** A role or a user a restriction can name. */
493
+ export declare const PermissionSubjectSchema: z.ZodObject<{
494
+ subjectKind: z.ZodEnum<{
495
+ role: "role";
496
+ user: "user";
497
+ }>;
498
+ subjectId: z.ZodString;
499
+ label: z.ZodString;
500
+ detail: z.ZodNullable<z.ZodString>;
501
+ }, z.core.$strip>;
502
+ export type PermissionSubject = z.infer<typeof PermissionSubjectSchema>;
503
+ export declare const PermissionSubjectsResponseSchema: z.ZodObject<{
504
+ items: z.ZodArray<z.ZodObject<{
505
+ subjectKind: z.ZodEnum<{
506
+ role: "role";
507
+ user: "user";
508
+ }>;
509
+ subjectId: z.ZodString;
510
+ label: z.ZodString;
511
+ detail: z.ZodNullable<z.ZodString>;
512
+ }, z.core.$strip>>;
513
+ nextCursor: z.ZodNullable<z.ZodString>;
514
+ }, z.core.$strip>;
515
+ export type PermissionSubjectsResponse = z.infer<typeof PermissionSubjectsResponseSchema>;
516
+ /** The longest search text the subjects route takes. */
517
+ export declare const PERMISSION_SUBJECT_QUERY_MAX = 100;
518
+ /** The longest cursor the subjects route takes: a marker for the stretch, a colon, then a role id or a user id. */
519
+ export declare const PERMISSION_SUBJECT_CURSOR_MAX = 200;
520
+ export declare const PermissionSubjectsQuerySchema: z.ZodObject<{
521
+ q: z.ZodOptional<z.ZodString>;
522
+ cursor: z.ZodOptional<z.ZodString>;
523
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
524
+ }, z.core.$strip>;
525
+ export type PermissionSubjectsQuery = z.infer<typeof PermissionSubjectsQuerySchema>;
526
+ /** The destination of a move whose impact is asked: a parent id, or empty or absent for the top level. */
527
+ export declare const MoveImpactQuerySchema: z.ZodObject<{
528
+ targetParentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
529
+ }, z.core.$strip>;
530
+ export type MoveImpactQuery = z.infer<typeof MoveImpactQuerySchema>;
531
+ /** Per action, the entry the page inherits where it is (`now`) and the one it
532
+ * would inherit under the destination (`after`), each null when no entry is
533
+ * above. Only the actions where they differ are listed; an empty list means
534
+ * the move changes nothing the page inherits. The page's own entries travel
535
+ * with it and are not compared. */
536
+ export declare const MoveImpactResponseSchema: z.ZodObject<{
537
+ changes: z.ZodArray<z.ZodObject<{
538
+ action: z.ZodEnum<{
539
+ "content.read": "content.read";
540
+ "content.create": "content.create";
541
+ "content.update": "content.update";
542
+ "content.publish": "content.publish";
543
+ "content.delete": "content.delete";
544
+ }>;
545
+ now: z.ZodNullable<z.ZodObject<{
546
+ nodeId: z.ZodString;
547
+ path: z.ZodNullable<z.ZodString>;
548
+ name: z.ZodNullable<z.ZodString>;
549
+ mode: z.ZodEnum<{
550
+ restricted: "restricted";
551
+ open: "open";
552
+ }>;
553
+ grants: z.ZodArray<z.ZodObject<{
554
+ subjectKind: z.ZodEnum<{
555
+ role: "role";
556
+ user: "user";
557
+ }>;
558
+ subjectId: z.ZodString;
559
+ label: z.ZodNullable<z.ZodString>;
560
+ }, z.core.$strip>>;
561
+ }, z.core.$strip>>;
562
+ after: z.ZodNullable<z.ZodObject<{
563
+ nodeId: z.ZodString;
564
+ path: z.ZodNullable<z.ZodString>;
565
+ name: z.ZodNullable<z.ZodString>;
566
+ mode: z.ZodEnum<{
567
+ restricted: "restricted";
568
+ open: "open";
569
+ }>;
570
+ grants: z.ZodArray<z.ZodObject<{
571
+ subjectKind: z.ZodEnum<{
572
+ role: "role";
573
+ user: "user";
574
+ }>;
575
+ subjectId: z.ZodString;
576
+ label: z.ZodNullable<z.ZodString>;
577
+ }, z.core.$strip>>;
578
+ }, z.core.$strip>>;
579
+ }, z.core.$strip>>;
580
+ }, z.core.$strip>;
581
+ export type MoveImpactResponse = z.infer<typeof MoveImpactResponseSchema>;
582
+ /** The answer of a clear: how many pages had restrictions removed. */
583
+ export declare const ClearRestrictionsResponseSchema: z.ZodObject<{
584
+ clearedNodes: z.ZodNumber;
585
+ }, z.core.$strip>;
586
+ export type ClearRestrictionsResponse = z.infer<typeof ClearRestrictionsResponseSchema>;
587
+ /** The subject an explanation is about. */
588
+ export declare const ExplainSubjectQuerySchema: z.ZodObject<{
589
+ subjectKind: z.ZodEnum<{
590
+ role: "role";
591
+ user: "user";
592
+ }>;
593
+ subjectId: z.ZodString;
594
+ }, z.core.$strip>;
595
+ export type ExplainSubjectQuery = z.infer<typeof ExplainSubjectQuerySchema>;
596
+ /** One requirement as the decision evaluated it, labelled for the asker.
597
+ * `roleAction` is the role action checked (content.restore for a restore's
598
+ * Delete row). `decidedAt` is the deciding entry in S278b's shape (labels,
599
+ * never emails), null when no entry decided. `askedAt` is where the
600
+ * requirement was asked: the page itself, a page under it, or the
601
+ * destination; the top level has the empty id and the path "/".
602
+ * `subjectListed` is true when the subject, or the subject's role, is among
603
+ * the deciding entry's grants as stored. */
604
+ export declare const AccessTraceViewSchema: z.ZodObject<{
605
+ action: z.ZodEnum<{
606
+ "content.read": "content.read";
607
+ "content.create": "content.create";
608
+ "content.update": "content.update";
609
+ "content.publish": "content.publish";
610
+ "content.delete": "content.delete";
611
+ }>;
612
+ roleAction: z.ZodString;
613
+ roleActionLabel: z.ZodString;
614
+ roleHoldsAction: z.ZodBoolean;
615
+ allowed: z.ZodBoolean;
616
+ reason: z.ZodEnum<{
617
+ admin: "admin";
618
+ "role-lacks-action": "role-lacks-action";
619
+ unrestricted: "unrestricted";
620
+ reopened: "reopened";
621
+ granted: "granted";
622
+ "not-granted": "not-granted";
623
+ }>;
624
+ decidedAt: z.ZodNullable<z.ZodObject<{
625
+ nodeId: z.ZodString;
626
+ path: z.ZodNullable<z.ZodString>;
627
+ name: z.ZodNullable<z.ZodString>;
628
+ mode: z.ZodEnum<{
629
+ restricted: "restricted";
630
+ open: "open";
631
+ }>;
632
+ grants: z.ZodArray<z.ZodObject<{
633
+ subjectKind: z.ZodEnum<{
634
+ role: "role";
635
+ user: "user";
636
+ }>;
637
+ subjectId: z.ZodString;
638
+ label: z.ZodNullable<z.ZodString>;
639
+ }, z.core.$strip>>;
640
+ }, z.core.$strip>>;
641
+ askedAt: z.ZodObject<{
642
+ nodeId: z.ZodString;
643
+ path: z.ZodNullable<z.ZodString>;
644
+ name: z.ZodNullable<z.ZodString>;
645
+ kind: z.ZodEnum<{
646
+ node: "node";
647
+ below: "below";
648
+ destination: "destination";
649
+ }>;
650
+ }, z.core.$strip>;
651
+ ownEntry: z.ZodBoolean;
652
+ orphan: z.ZodBoolean;
653
+ subjectListed: z.ZodBoolean;
654
+ }, z.core.$strip>;
655
+ export type AccessTraceView = z.infer<typeof AccessTraceViewSchema>;
656
+ /** The five actions on one page for one subject, in the order of RESTRICTABLE_ACTIONS. */
657
+ export declare const ExplainResponseSchema: z.ZodObject<{
658
+ subject: z.ZodObject<{
659
+ subjectKind: z.ZodEnum<{
660
+ role: "role";
661
+ user: "user";
662
+ }>;
663
+ subjectId: z.ZodString;
664
+ label: z.ZodString;
665
+ roleId: z.ZodString;
666
+ roleLabel: z.ZodString;
667
+ }, z.core.$strip>;
668
+ rows: z.ZodArray<z.ZodObject<{
669
+ action: z.ZodEnum<{
670
+ "content.read": "content.read";
671
+ "content.create": "content.create";
672
+ "content.update": "content.update";
673
+ "content.publish": "content.publish";
674
+ "content.delete": "content.delete";
675
+ }>;
676
+ roleAction: z.ZodString;
677
+ roleActionLabel: z.ZodString;
678
+ roleHoldsAction: z.ZodBoolean;
679
+ allowed: z.ZodBoolean;
680
+ reason: z.ZodEnum<{
681
+ admin: "admin";
682
+ "role-lacks-action": "role-lacks-action";
683
+ unrestricted: "unrestricted";
684
+ reopened: "reopened";
685
+ granted: "granted";
686
+ "not-granted": "not-granted";
687
+ }>;
688
+ decidedAt: z.ZodNullable<z.ZodObject<{
689
+ nodeId: z.ZodString;
690
+ path: z.ZodNullable<z.ZodString>;
691
+ name: z.ZodNullable<z.ZodString>;
692
+ mode: z.ZodEnum<{
693
+ restricted: "restricted";
694
+ open: "open";
695
+ }>;
696
+ grants: z.ZodArray<z.ZodObject<{
697
+ subjectKind: z.ZodEnum<{
698
+ role: "role";
699
+ user: "user";
700
+ }>;
701
+ subjectId: z.ZodString;
702
+ label: z.ZodNullable<z.ZodString>;
703
+ }, z.core.$strip>>;
704
+ }, z.core.$strip>>;
705
+ askedAt: z.ZodObject<{
706
+ nodeId: z.ZodString;
707
+ path: z.ZodNullable<z.ZodString>;
708
+ name: z.ZodNullable<z.ZodString>;
709
+ kind: z.ZodEnum<{
710
+ node: "node";
711
+ below: "below";
712
+ destination: "destination";
713
+ }>;
714
+ }, z.core.$strip>;
715
+ ownEntry: z.ZodBoolean;
716
+ orphan: z.ZodBoolean;
717
+ subjectListed: z.ZodBoolean;
718
+ }, z.core.$strip>>;
719
+ }, z.core.$strip>;
720
+ export type ExplainResponse = z.infer<typeof ExplainResponseSchema>;
721
+ /** An operation to explain. `targetParentId` is the destination of a move or a copy: empty or absent for the top level, else a page id (as MoveImpactQuerySchema has it). */
722
+ export declare const ExplainOperationQuerySchema: z.ZodObject<{
723
+ subjectKind: z.ZodEnum<{
724
+ role: "role";
725
+ user: "user";
726
+ }>;
727
+ subjectId: z.ZodString;
728
+ operation: z.ZodEnum<{
729
+ delete: "delete";
730
+ move: "move";
731
+ copy: "copy";
732
+ restore: "restore";
733
+ }>;
734
+ targetParentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
735
+ }, z.core.$strip>;
736
+ export type ExplainOperationQuery = z.infer<typeof ExplainOperationQuerySchema>;
737
+ /** Every requirement of the operation in the order it is checked, and the index of the first refused (null when all are allowed). */
738
+ export declare const ExplainOperationResponseSchema: z.ZodObject<{
739
+ requirements: z.ZodArray<z.ZodObject<{
740
+ action: z.ZodEnum<{
741
+ "content.read": "content.read";
742
+ "content.create": "content.create";
743
+ "content.update": "content.update";
744
+ "content.publish": "content.publish";
745
+ "content.delete": "content.delete";
746
+ }>;
747
+ roleAction: z.ZodString;
748
+ roleActionLabel: z.ZodString;
749
+ roleHoldsAction: z.ZodBoolean;
750
+ allowed: z.ZodBoolean;
751
+ reason: z.ZodEnum<{
752
+ admin: "admin";
753
+ "role-lacks-action": "role-lacks-action";
754
+ unrestricted: "unrestricted";
755
+ reopened: "reopened";
756
+ granted: "granted";
757
+ "not-granted": "not-granted";
758
+ }>;
759
+ decidedAt: z.ZodNullable<z.ZodObject<{
760
+ nodeId: z.ZodString;
761
+ path: z.ZodNullable<z.ZodString>;
762
+ name: z.ZodNullable<z.ZodString>;
763
+ mode: z.ZodEnum<{
764
+ restricted: "restricted";
765
+ open: "open";
766
+ }>;
767
+ grants: z.ZodArray<z.ZodObject<{
768
+ subjectKind: z.ZodEnum<{
769
+ role: "role";
770
+ user: "user";
771
+ }>;
772
+ subjectId: z.ZodString;
773
+ label: z.ZodNullable<z.ZodString>;
774
+ }, z.core.$strip>>;
775
+ }, z.core.$strip>>;
776
+ askedAt: z.ZodObject<{
777
+ nodeId: z.ZodString;
778
+ path: z.ZodNullable<z.ZodString>;
779
+ name: z.ZodNullable<z.ZodString>;
780
+ kind: z.ZodEnum<{
781
+ node: "node";
782
+ below: "below";
783
+ destination: "destination";
784
+ }>;
785
+ }, z.core.$strip>;
786
+ ownEntry: z.ZodBoolean;
787
+ orphan: z.ZodBoolean;
788
+ subjectListed: z.ZodBoolean;
789
+ }, z.core.$strip>>;
790
+ firstRefused: z.ZodNullable<z.ZodNumber>;
791
+ }, z.core.$strip>;
792
+ export type ExplainOperationResponse = z.infer<typeof ExplainOperationResponseSchema>;
793
+ /** The longest list of pages opened again below that who-can sends; `total` counts them all. */
794
+ export declare const OPENED_BELOW_MAX = 50;
795
+ /** Who may do each action on a page once roles and restrictions are both
796
+ * counted (D6), and the pages under it that open an action restricted here
797
+ * or above again (D7). `unrestricted` means every role holding the action,
798
+ * and `allowed` is then empty. */
799
+ export declare const WhoCanResponseSchema: z.ZodObject<{
800
+ rows: z.ZodArray<z.ZodObject<{
801
+ action: z.ZodEnum<{
802
+ "content.read": "content.read";
803
+ "content.create": "content.create";
804
+ "content.update": "content.update";
805
+ "content.publish": "content.publish";
806
+ "content.delete": "content.delete";
807
+ }>;
808
+ unrestricted: z.ZodBoolean;
809
+ allowed: z.ZodArray<z.ZodObject<{
810
+ subjectKind: z.ZodEnum<{
811
+ role: "role";
812
+ user: "user";
813
+ }>;
814
+ subjectId: z.ZodString;
815
+ label: z.ZodString;
816
+ }, z.core.$strip>>;
817
+ withoutEffect: z.ZodArray<z.ZodObject<{
818
+ subjectKind: z.ZodEnum<{
819
+ role: "role";
820
+ user: "user";
821
+ }>;
822
+ subjectId: z.ZodString;
823
+ label: z.ZodNullable<z.ZodString>;
824
+ why: z.ZodEnum<{
825
+ "role-lacks-action": "role-lacks-action";
826
+ removed: "removed";
827
+ }>;
828
+ }, z.core.$strip>>;
829
+ }, z.core.$strip>>;
830
+ openedBelow: z.ZodObject<{
831
+ items: z.ZodArray<z.ZodObject<{
832
+ nodeId: z.ZodString;
833
+ path: z.ZodNullable<z.ZodString>;
834
+ name: z.ZodNullable<z.ZodString>;
835
+ actions: z.ZodArray<z.ZodEnum<{
836
+ "content.read": "content.read";
837
+ "content.create": "content.create";
838
+ "content.update": "content.update";
839
+ "content.publish": "content.publish";
840
+ "content.delete": "content.delete";
841
+ }>>;
842
+ }, z.core.$strip>>;
843
+ total: z.ZodNumber;
844
+ }, z.core.$strip>;
845
+ }, z.core.$strip>;
846
+ export type WhoCanResponse = z.infer<typeof WhoCanResponseSchema>;