@kardalum/plugin-sdk 0.0.0-stage → 0.16.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.
- package/CHANGELOG.md +118 -0
- package/LICENSE +202 -0
- package/README.md +80 -2
- package/dist/admin-section-registry.d.ts +34 -0
- package/dist/admin-section-registry.js +49 -0
- package/dist/built-in-serializers.d.ts +3 -0
- package/dist/built-in-serializers.js +18 -0
- package/dist/built-in-settings-schemas.d.ts +14 -0
- package/dist/built-in-settings-schemas.js +225 -0
- package/dist/built-in-value-schemas.d.ts +4 -0
- package/dist/built-in-value-schemas.js +47 -0
- package/dist/built-ins.d.ts +1 -0
- package/dist/built-ins.js +257 -0
- package/dist/capabilities.d.ts +29 -0
- package/dist/capabilities.js +67 -0
- package/dist/data-type-plugin.d.ts +28 -0
- package/dist/data-type-plugin.js +1 -0
- package/dist/datatype-validation.d.ts +26 -0
- package/dist/datatype-validation.js +110 -0
- package/dist/datatypes-entry.d.ts +4 -0
- package/dist/datatypes-entry.js +18 -0
- package/dist/define-plugin.d.ts +25 -0
- package/dist/define-plugin.js +51 -0
- package/dist/entitlement-entry.d.ts +5 -0
- package/dist/entitlement-entry.js +24 -0
- package/dist/entitlement-gate.d.ts +36 -0
- package/dist/entitlement-gate.js +201 -0
- package/dist/entitlement-types.d.ts +39 -0
- package/dist/entitlement-types.js +1 -0
- package/dist/entitlement.d.ts +57 -0
- package/dist/entitlement.js +170 -0
- package/dist/host-entry.d.ts +1 -0
- package/dist/host-entry.js +11 -0
- package/dist/icon-name.d.ts +1 -0
- package/dist/icon-name.js +1 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +10 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +94 -0
- package/dist/license-verdict-keys.d.ts +18 -0
- package/dist/license-verdict-keys.js +26 -0
- package/dist/local-host.d.ts +3 -0
- package/dist/local-host.js +38 -0
- package/dist/manifest-entry.d.ts +8 -0
- package/dist/manifest-entry.js +13 -0
- package/dist/manifest-schema.d.ts +476 -0
- package/dist/manifest-schema.js +823 -0
- package/dist/manifest.d.ts +611 -0
- package/dist/manifest.js +86 -0
- package/dist/media/media-picker.d.ts +39 -0
- package/dist/media/media-picker.js +447 -0
- package/dist/media/upload-error.d.ts +12 -0
- package/dist/media/upload-error.js +30 -0
- package/dist/plugin-context.d.ts +82 -0
- package/dist/plugin-context.js +77 -0
- package/dist/plugin-screen-context.d.ts +71 -0
- package/dist/plugin-screen-context.js +41 -0
- package/dist/read-all-pages.d.ts +23 -0
- package/dist/read-all-pages.js +30 -0
- package/dist/register-built-ins.d.ts +1 -0
- package/dist/register-built-ins.js +41 -0
- package/dist/registry.d.ts +4 -0
- package/dist/registry.js +17 -0
- package/dist/rendition-eligibility.d.ts +24 -0
- package/dist/rendition-eligibility.js +40 -0
- package/dist/richtext/block-panel.d.ts +27 -0
- package/dist/richtext/block-panel.js +232 -0
- package/dist/richtext/extensions.d.ts +19 -0
- package/dist/richtext/extensions.js +56 -0
- package/dist/richtext/insert-menu.d.ts +24 -0
- package/dist/richtext/insert-menu.js +142 -0
- package/dist/richtext/kardalum-block.d.ts +33 -0
- package/dist/richtext/kardalum-block.js +282 -0
- package/dist/richtext/style-listbox.d.ts +10 -0
- package/dist/richtext/style-listbox.js +69 -0
- package/dist/richtext/text-style-class.d.ts +18 -0
- package/dist/richtext/text-style-class.js +36 -0
- package/dist/simple-storage-value-provider.d.ts +9 -0
- package/dist/simple-storage-value-provider.js +96 -0
- package/dist/structured-storage-types.d.ts +61 -0
- package/dist/structured-storage-types.js +11 -0
- package/dist/tailwind.d.ts +1 -0
- package/dist/tailwind.js +5 -0
- package/dist/tokens/system-dark.css +75 -0
- package/dist/tokens/tokens.css +239 -0
- package/dist/tokens/tokens.json +212 -0
- package/dist/tokens.d.ts +1 -0
- package/dist/tokens.js +11 -0
- package/dist/ui-entry.d.ts +5 -0
- package/dist/ui-entry.js +42 -0
- package/dist/views/content-list-preview.d.ts +1 -0
- package/dist/views/content-list-preview.js +14 -0
- package/dist/views/content-list-settings-view.d.ts +1 -0
- package/dist/views/content-list-settings-view.js +97 -0
- package/dist/views/content-list-view.d.ts +19 -0
- package/dist/views/content-list-view.js +248 -0
- package/dist/views/crop-view.d.ts +55 -0
- package/dist/views/crop-view.js +161 -0
- package/dist/views/date-range-view.d.ts +6 -0
- package/dist/views/date-range-view.js +55 -0
- package/dist/views/file-upload-view.d.ts +43 -0
- package/dist/views/file-upload-view.js +104 -0
- package/dist/views/html-code-editor.d.ts +10 -0
- package/dist/views/html-code-editor.js +101 -0
- package/dist/views/html-view.d.ts +3 -0
- package/dist/views/html-view.js +53 -0
- package/dist/views/image-view.d.ts +3 -0
- package/dist/views/image-view.js +372 -0
- package/dist/views/rich-text-view.d.ts +2 -0
- package/dist/views/rich-text-view.js +429 -0
- package/node_modules/@kardalum/api-schemas/LICENSE +202 -0
- package/node_modules/@kardalum/api-schemas/README.md +56 -0
- package/node_modules/@kardalum/api-schemas/dist/action.schema.d.ts +30 -0
- package/node_modules/@kardalum/api-schemas/dist/action.schema.js +88 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.d.ts +17 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +25 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +93 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +88 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.d.ts +89 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.d.ts +24 -0
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.js +47 -0
- package/node_modules/@kardalum/api-schemas/dist/auth.schema.d.ts +38 -0
- package/node_modules/@kardalum/api-schemas/dist/auth.schema.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +542 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +357 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +158 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +125 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +260 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.d.ts +152 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +82 -0
- package/node_modules/@kardalum/api-schemas/dist/content-version.schema.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/content-version.schema.js +22 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +17 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +20 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +352 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +133 -0
- package/node_modules/@kardalum/api-schemas/dist/culture-direction.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/culture-direction.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +298 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +121 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +147 -0
- package/node_modules/@kardalum/api-schemas/dist/health.schema.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/health.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/html-entities.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/html-entities.js +250 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +113 -0
- package/node_modules/@kardalum/api-schemas/dist/index.js +64 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +73 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +104 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +682 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +269 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +177 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +222 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-use.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-use.js +117 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +27 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +279 -0
- package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.d.ts +74 -0
- package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.js +157 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +80 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +156 -0
- package/node_modules/@kardalum/api-schemas/dist/nav.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/nav.schema.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +846 -0
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +356 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +249 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.js +84 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.js +889 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +172 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +196 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +59 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +585 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +536 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +391 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +413 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +29 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +100 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +162 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +24 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +314 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +338 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +79 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +50 -0
- package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/reserved-slugs.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/reserved-slugs.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +96 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.js +75 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content-outcome.schema.d.ts +17 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content-outcome.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +79 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +138 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +105 -0
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.d.ts +243 -0
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +296 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +47 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +30 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +112 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +74 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +39 -0
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.d.ts +21 -0
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +97 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +73 -0
- package/node_modules/@kardalum/api-schemas/package.json +35 -0
- package/node_modules/@kardalum/design-tokens/LICENSE +202 -0
- package/node_modules/@kardalum/design-tokens/README.md +29 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.d.ts +32 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +88 -0
- package/node_modules/@kardalum/design-tokens/dist/generate.d.ts +1 -0
- package/node_modules/@kardalum/design-tokens/dist/generate.js +18 -0
- package/node_modules/@kardalum/design-tokens/dist/index.d.ts +6 -0
- package/node_modules/@kardalum/design-tokens/dist/index.js +4 -0
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +75 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +33 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +54 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-css.d.ts +12 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-css.js +42 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-types.d.ts +43 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-types.js +1 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.d.ts +13 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.js +120 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/index.d.ts +5 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/index.js +4 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/light.d.ts +9 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/light.js +13 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +239 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +25 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +276 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +212 -0
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +91 -0
- package/node_modules/@kardalum/design-tokens/dist/types.js +5 -0
- package/node_modules/@kardalum/design-tokens/package.json +42 -0
- package/node_modules/@kardalum/plugin-package/LICENSE +202 -0
- package/node_modules/@kardalum/plugin-package/README.md +71 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +111 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +61 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +103 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +351 -0
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.d.ts +50 -0
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.js +659 -0
- package/node_modules/@kardalum/plugin-package/dist/envelope.d.ts +19 -0
- package/node_modules/@kardalum/plugin-package/dist/envelope.js +104 -0
- package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +37 -0
- package/node_modules/@kardalum/plugin-package/dist/extract.js +199 -0
- package/node_modules/@kardalum/plugin-package/dist/hash.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/hash.js +69 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +13 -0
- package/node_modules/@kardalum/plugin-package/dist/index.js +8 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +185 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +236 -0
- package/node_modules/@kardalum/plugin-package/dist/package-contract.d.ts +50 -0
- package/node_modules/@kardalum/plugin-package/dist/package-contract.js +115 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.js +6 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +20 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.js +57 -0
- package/node_modules/@kardalum/plugin-package/dist/types.d.ts +43 -0
- package/node_modules/@kardalum/plugin-package/dist/types.js +15 -0
- package/node_modules/@kardalum/plugin-package/package.json +54 -0
- package/node_modules/@kardalum/ui/LICENSE +202 -0
- package/node_modules/@kardalum/ui/README.md +35 -0
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.d.ts +14 -0
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.js +38 -0
- package/node_modules/@kardalum/ui/dist/components/badge.d.ts +9 -0
- package/node_modules/@kardalum/ui/dist/components/badge.js +30 -0
- package/node_modules/@kardalum/ui/dist/components/button.d.ts +11 -0
- package/node_modules/@kardalum/ui/dist/components/button.js +37 -0
- package/node_modules/@kardalum/ui/dist/components/checkbox.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/components/checkbox.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/dialog.d.ts +17 -0
- package/node_modules/@kardalum/ui/dist/components/dialog.js +48 -0
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.d.ts +18 -0
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +53 -0
- package/node_modules/@kardalum/ui/dist/components/empty-state.d.ts +30 -0
- package/node_modules/@kardalum/ui/dist/components/empty-state.js +9 -0
- package/node_modules/@kardalum/ui/dist/components/input.d.ts +4 -0
- package/node_modules/@kardalum/ui/dist/components/input.js +6 -0
- package/node_modules/@kardalum/ui/dist/components/panel.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/components/panel.js +6 -0
- package/node_modules/@kardalum/ui/dist/components/property-field.d.ts +19 -0
- package/node_modules/@kardalum/ui/dist/components/property-field.js +89 -0
- package/node_modules/@kardalum/ui/dist/components/sheet.d.ts +17 -0
- package/node_modules/@kardalum/ui/dist/components/sheet.js +55 -0
- package/node_modules/@kardalum/ui/dist/components/skeleton.d.ts +3 -0
- package/node_modules/@kardalum/ui/dist/components/skeleton.js +9 -0
- package/node_modules/@kardalum/ui/dist/components/switch.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/components/switch.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/tab-strip.d.ts +34 -0
- package/node_modules/@kardalum/ui/dist/components/tab-strip.js +72 -0
- package/node_modules/@kardalum/ui/dist/components/toast.d.ts +18 -0
- package/node_modules/@kardalum/ui/dist/components/toast.js +42 -0
- package/node_modules/@kardalum/ui/dist/components/toaster.d.ts +12 -0
- package/node_modules/@kardalum/ui/dist/components/toaster.js +11 -0
- package/node_modules/@kardalum/ui/dist/components/use-toast.d.ts +17 -0
- package/node_modules/@kardalum/ui/dist/components/use-toast.js +62 -0
- package/node_modules/@kardalum/ui/dist/index.d.ts +18 -0
- package/node_modules/@kardalum/ui/dist/index.js +18 -0
- package/node_modules/@kardalum/ui/dist/lib/cn.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/lib/cn.js +5 -0
- package/node_modules/@kardalum/ui/package.json +63 -0
- package/package.json +146 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ContentVersionSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
contentId: z.ZodString;
|
|
5
|
+
version: z.ZodNumber;
|
|
6
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
7
|
+
cultureData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
8
|
+
createdAt: z.ZodString;
|
|
9
|
+
createdBy: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type ContentVersion = z.infer<typeof ContentVersionSchema>;
|
|
12
|
+
/**
|
|
13
|
+
* One version's values for `culture` exactly as stored, flattened: the
|
|
14
|
+
* invariant slice with that culture's own slice over it, no fallback. This
|
|
15
|
+
* is the shape a save takes, so it is what an editor edits and what a
|
|
16
|
+
* write merges over.
|
|
17
|
+
*/
|
|
18
|
+
export declare function flattenForCulture(version: Pick<ContentVersion, "data" | "cultureData">, culture: string): Record<string, unknown>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const ContentVersionSchema = z.object({
|
|
3
|
+
id: z.string().uuid(),
|
|
4
|
+
contentId: z.string().uuid(),
|
|
5
|
+
version: z.number().int().positive(),
|
|
6
|
+
data: z.record(z.string(), z.unknown()),
|
|
7
|
+
// S229b: the per-culture slice. `data` above is the invariant slice and
|
|
8
|
+
// keeps its exact meaning. Null or absent on every version written
|
|
9
|
+
// before a field was marked as varying.
|
|
10
|
+
cultureData: z.record(z.string(), z.record(z.string(), z.unknown())).nullish(),
|
|
11
|
+
createdAt: z.string().datetime(),
|
|
12
|
+
createdBy: z.string().uuid(),
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* One version's values for `culture` exactly as stored, flattened: the
|
|
16
|
+
* invariant slice with that culture's own slice over it, no fallback. This
|
|
17
|
+
* is the shape a save takes, so it is what an editor edits and what a
|
|
18
|
+
* write merges over.
|
|
19
|
+
*/
|
|
20
|
+
export function flattenForCulture(version, culture) {
|
|
21
|
+
return { ...version.data, ...(version.cultureData?.[culture] ?? {}) };
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ContentNodeSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
parentId: z.ZodNullable<z.ZodString>;
|
|
5
|
+
path: z.ZodString;
|
|
6
|
+
depth: z.ZodNumber;
|
|
7
|
+
sortOrder: z.ZodNumber;
|
|
8
|
+
documentTypeId: z.ZodString;
|
|
9
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type ContentNode = z.infer<typeof ContentNodeSchema>;
|
|
12
|
+
export declare const NodeCultureSchema: z.ZodObject<{
|
|
13
|
+
culture: z.ZodString;
|
|
14
|
+
currentVersion: z.ZodNumber;
|
|
15
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type NodeCulture = z.infer<typeof NodeCultureSchema>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const ContentNodeSchema = z.object({
|
|
3
|
+
id: z.string().uuid(),
|
|
4
|
+
parentId: z.string().uuid().nullable(),
|
|
5
|
+
path: z.string().min(1),
|
|
6
|
+
depth: z.number().int().nonnegative(),
|
|
7
|
+
sortOrder: z.number().int(),
|
|
8
|
+
documentTypeId: z.string().uuid(),
|
|
9
|
+
// Published in at least one culture: the most recent publish across all
|
|
10
|
+
// of them, maintained by setNodeCulture. Which version each culture
|
|
11
|
+
// serves is NodeCulture, not the node.
|
|
12
|
+
publishedAt: z.string().datetime().nullable(),
|
|
13
|
+
});
|
|
14
|
+
// One culture's publish state for one node (content_node_cultures). A node
|
|
15
|
+
// holds every language; each culture points at the version it serves.
|
|
16
|
+
export const NodeCultureSchema = z.object({
|
|
17
|
+
culture: z.string().min(2),
|
|
18
|
+
currentVersion: z.number().int().positive(),
|
|
19
|
+
publishedAt: z.string().datetime().nullable(),
|
|
20
|
+
});
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
export interface CoreAction {
|
|
2
|
+
action: string;
|
|
3
|
+
adminGatedToday: boolean;
|
|
4
|
+
label: string;
|
|
5
|
+
/** S303: what a holder of an API key should know that the label does not say
|
|
6
|
+
* (the reach of the action on the management API, or that a key is refused
|
|
7
|
+
* it). Shown under the label in the key form only. Plain English, one or two
|
|
8
|
+
* sentences, true of the routes in `route`. */
|
|
9
|
+
keyNote?: string;
|
|
10
|
+
/** The route this action governs, as "<METHOD> <path>", and the gate it
|
|
11
|
+
* carried when S270 annotated it. This is the evidence for
|
|
12
|
+
* `adminGatedToday`, kept beside it so that changing a gate in a route
|
|
13
|
+
* file and not changing this is a visible inconsistency rather than an
|
|
14
|
+
* invisible one. Where the flag is true, and for the content rows, these routes
|
|
15
|
+
* carry requireAction(<action>); since S300b every row's routes carry requireAction(<action>). */
|
|
16
|
+
route: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const CORE_ACTIONS: readonly [{
|
|
19
|
+
readonly action: "content.read";
|
|
20
|
+
readonly adminGatedToday: false;
|
|
21
|
+
readonly label: "View content and mint preview links";
|
|
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/plugins/:pluginId/storage/:contentId/:fieldId";
|
|
24
|
+
}, {
|
|
25
|
+
readonly action: "content.create";
|
|
26
|
+
readonly adminGatedToday: false;
|
|
27
|
+
readonly label: "Create and copy content";
|
|
28
|
+
readonly route: "POST /api/manage/v1/content, POST /api/manage/v1/content/:id/copy";
|
|
29
|
+
}, {
|
|
30
|
+
readonly action: "content.update";
|
|
31
|
+
readonly adminGatedToday: false;
|
|
32
|
+
readonly label: "Edit, move and reorder content";
|
|
33
|
+
readonly 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
|
+
}, {
|
|
35
|
+
readonly action: "content.publish";
|
|
36
|
+
readonly adminGatedToday: false;
|
|
37
|
+
readonly label: "Publish content";
|
|
38
|
+
readonly route: "POST /api/manage/v1/content/:id/publish, POST /api/manage/v1/content/:id/publish-all";
|
|
39
|
+
}, {
|
|
40
|
+
readonly action: "content.delete";
|
|
41
|
+
readonly adminGatedToday: true;
|
|
42
|
+
readonly label: "Move content to the trash";
|
|
43
|
+
readonly route: "DELETE /api/manage/v1/content/:id";
|
|
44
|
+
}, {
|
|
45
|
+
readonly action: "content.readTrash";
|
|
46
|
+
readonly adminGatedToday: true;
|
|
47
|
+
readonly label: "View trashed content";
|
|
48
|
+
readonly route: "GET /api/manage/v1/content/trash";
|
|
49
|
+
}, {
|
|
50
|
+
readonly action: "content.restore";
|
|
51
|
+
readonly adminGatedToday: true;
|
|
52
|
+
readonly label: "Restore trashed content";
|
|
53
|
+
readonly route: "POST /api/manage/v1/content/:id/restore";
|
|
54
|
+
}, {
|
|
55
|
+
readonly action: "content.managePermissions";
|
|
56
|
+
readonly adminGatedToday: true;
|
|
57
|
+
readonly label: "Manage permissions on content";
|
|
58
|
+
readonly keyNote: "Reads and changes which roles and users may reach which page.";
|
|
59
|
+
readonly route: "GET /api/manage/v1/content/:id/permissions, PUT /api/manage/v1/content/:id/permissions, GET /api/manage/v1/content/permission-subjects, DELETE /api/manage/v1/content/:id/restrictions, GET /api/manage/v1/content/:id/explain, GET /api/manage/v1/content/:id/explain-operation, GET /api/manage/v1/content/:id/who-can";
|
|
60
|
+
}, {
|
|
61
|
+
readonly action: "media.read";
|
|
62
|
+
readonly adminGatedToday: false;
|
|
63
|
+
readonly label: "View media";
|
|
64
|
+
readonly keyNote: "Lists and reads every media file with its versions, references and cuts, private files included, each with a working signed link.";
|
|
65
|
+
readonly route: "GET /api/manage/v1/media, GET /api/manage/v1/media/:id, GET /api/manage/v1/media/:id/versions, GET /api/manage/v1/media/:id/references, GET /api/manage/v1/media/:id/renditions, GET /api/manage/v1/media/folders";
|
|
66
|
+
}, {
|
|
67
|
+
readonly action: "media.readTrash";
|
|
68
|
+
readonly adminGatedToday: false;
|
|
69
|
+
readonly label: "View the media Recycle Bin";
|
|
70
|
+
readonly keyNote: "Lists the Recycle Bin and what still uses the trashed files.";
|
|
71
|
+
readonly route: "GET /api/manage/v1/media/trash, GET /api/manage/v1/media/trash/references";
|
|
72
|
+
}, {
|
|
73
|
+
readonly action: "media.link";
|
|
74
|
+
readonly adminGatedToday: false;
|
|
75
|
+
readonly label: "Create links to media files";
|
|
76
|
+
readonly keyNote: "Mints a signed link to any media file through the explicit link route. The media reads already return one for a private file.";
|
|
77
|
+
readonly route: "POST /api/manage/v1/media/:id/link";
|
|
78
|
+
}, {
|
|
79
|
+
readonly action: "media.create";
|
|
80
|
+
readonly adminGatedToday: false;
|
|
81
|
+
readonly label: "Upload media";
|
|
82
|
+
readonly route: "POST /api/manage/v1/media, POST /api/manage/v1/media/folders, POST /api/manage/v1/media/:id/renditions";
|
|
83
|
+
}, {
|
|
84
|
+
readonly action: "media.update";
|
|
85
|
+
readonly adminGatedToday: false;
|
|
86
|
+
readonly label: "Edit media and media folders";
|
|
87
|
+
readonly route: "PATCH /api/manage/v1/media/:id, PATCH /api/manage/v1/media/folders/:id, POST /api/manage/v1/media/:id/replace, POST /api/manage/v1/media/:id/versions/:version/make-current, DELETE /api/manage/v1/media/folders/:id";
|
|
88
|
+
}, {
|
|
89
|
+
readonly action: "media.delete";
|
|
90
|
+
readonly adminGatedToday: false;
|
|
91
|
+
readonly label: "Move media to the trash";
|
|
92
|
+
readonly route: "DELETE /api/manage/v1/media/:id";
|
|
93
|
+
}, {
|
|
94
|
+
readonly action: "media.restore";
|
|
95
|
+
readonly adminGatedToday: false;
|
|
96
|
+
readonly label: "Restore trashed media";
|
|
97
|
+
readonly route: "POST /api/manage/v1/media/:id/restore";
|
|
98
|
+
}, {
|
|
99
|
+
readonly action: "media.deletePermanent";
|
|
100
|
+
readonly adminGatedToday: true;
|
|
101
|
+
readonly label: "Permanently delete media and media versions";
|
|
102
|
+
readonly route: "DELETE /api/manage/v1/media/:id/permanent, POST /api/manage/v1/media/trash/empty, DELETE /api/manage/v1/media/:id/versions/:version";
|
|
103
|
+
}, {
|
|
104
|
+
readonly action: "documentTypes.read";
|
|
105
|
+
readonly adminGatedToday: false;
|
|
106
|
+
readonly label: "View document types";
|
|
107
|
+
readonly route: "GET /api/manage/v1/document-types";
|
|
108
|
+
}, {
|
|
109
|
+
readonly action: "documentTypes.create";
|
|
110
|
+
readonly adminGatedToday: false;
|
|
111
|
+
readonly label: "Create document types";
|
|
112
|
+
readonly route: "POST /api/manage/v1/document-types";
|
|
113
|
+
}, {
|
|
114
|
+
readonly action: "documentTypes.update";
|
|
115
|
+
readonly adminGatedToday: false;
|
|
116
|
+
readonly label: "Edit document types";
|
|
117
|
+
readonly route: "PUT /api/manage/v1/document-types/:id, PATCH /api/manage/v1/document-types/:id/default-template";
|
|
118
|
+
}, {
|
|
119
|
+
readonly action: "documentTypes.delete";
|
|
120
|
+
readonly adminGatedToday: false;
|
|
121
|
+
readonly label: "Delete document types";
|
|
122
|
+
readonly route: "DELETE /api/manage/v1/document-types/:id";
|
|
123
|
+
}, {
|
|
124
|
+
readonly action: "dataTypes.read";
|
|
125
|
+
readonly adminGatedToday: false;
|
|
126
|
+
readonly label: "View data types";
|
|
127
|
+
readonly route: "GET /api/manage/v1/data-types, GET /api/manage/v1/data-types/:id";
|
|
128
|
+
}, {
|
|
129
|
+
readonly action: "dataTypes.create";
|
|
130
|
+
readonly adminGatedToday: false;
|
|
131
|
+
readonly label: "Create data types";
|
|
132
|
+
readonly route: "POST /api/manage/v1/data-types";
|
|
133
|
+
}, {
|
|
134
|
+
readonly action: "dataTypes.update";
|
|
135
|
+
readonly adminGatedToday: false;
|
|
136
|
+
readonly label: "Configure data types";
|
|
137
|
+
readonly route: "PATCH /api/manage/v1/data-types/:id";
|
|
138
|
+
}, {
|
|
139
|
+
readonly action: "templates.read";
|
|
140
|
+
readonly adminGatedToday: false;
|
|
141
|
+
readonly label: "View templates";
|
|
142
|
+
readonly route: "GET /api/manage/v1/templates, GET /api/manage/v1/templates/:id";
|
|
143
|
+
}, {
|
|
144
|
+
readonly action: "templates.create";
|
|
145
|
+
readonly adminGatedToday: true;
|
|
146
|
+
readonly label: "Create templates";
|
|
147
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
148
|
+
readonly route: "POST /api/manage/v1/templates";
|
|
149
|
+
}, {
|
|
150
|
+
readonly action: "templates.update";
|
|
151
|
+
readonly adminGatedToday: true;
|
|
152
|
+
readonly label: "Edit templates";
|
|
153
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
154
|
+
readonly route: "PATCH /api/manage/v1/templates/:id";
|
|
155
|
+
}, {
|
|
156
|
+
readonly action: "templates.delete";
|
|
157
|
+
readonly adminGatedToday: true;
|
|
158
|
+
readonly label: "Delete templates";
|
|
159
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
160
|
+
readonly route: "DELETE /api/manage/v1/templates/:id";
|
|
161
|
+
}, {
|
|
162
|
+
readonly action: "templates.sync";
|
|
163
|
+
readonly adminGatedToday: true;
|
|
164
|
+
readonly label: "Sync templates from disk";
|
|
165
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
166
|
+
readonly route: "POST /api/manage/v1/templates/sync";
|
|
167
|
+
}, {
|
|
168
|
+
readonly action: "assets.read";
|
|
169
|
+
readonly adminGatedToday: false;
|
|
170
|
+
readonly label: "View site assets";
|
|
171
|
+
readonly route: "GET /api/manage/v1/assets/tree, GET /api/manage/v1/assets/content, GET /api/manage/v1/assets/raw";
|
|
172
|
+
}, {
|
|
173
|
+
readonly action: "assets.create";
|
|
174
|
+
readonly adminGatedToday: true;
|
|
175
|
+
readonly label: "Upload site assets and create folders";
|
|
176
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
177
|
+
readonly route: "POST /api/manage/v1/assets/upload, POST /api/manage/v1/assets/extract-zip, POST /api/manage/v1/assets/folder";
|
|
178
|
+
}, {
|
|
179
|
+
readonly action: "assets.update";
|
|
180
|
+
readonly adminGatedToday: true;
|
|
181
|
+
readonly label: "Edit and rename site assets";
|
|
182
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
183
|
+
readonly route: "PUT /api/manage/v1/assets/content, PATCH /api/manage/v1/assets/rename";
|
|
184
|
+
}, {
|
|
185
|
+
readonly action: "assets.delete";
|
|
186
|
+
readonly adminGatedToday: true;
|
|
187
|
+
readonly label: "Delete site assets";
|
|
188
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
189
|
+
readonly route: "DELETE /api/manage/v1/assets";
|
|
190
|
+
}, {
|
|
191
|
+
readonly action: "assets.sync";
|
|
192
|
+
readonly adminGatedToday: true;
|
|
193
|
+
readonly label: "Sync site assets from disk";
|
|
194
|
+
readonly keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.";
|
|
195
|
+
readonly route: "POST /api/manage/v1/assets/sync";
|
|
196
|
+
}, {
|
|
197
|
+
readonly action: "render.read";
|
|
198
|
+
readonly adminGatedToday: true;
|
|
199
|
+
readonly label: "View text styles and embeddable blocks";
|
|
200
|
+
readonly route: "GET /api/manage/v1/render/text-styles, GET /api/manage/v1/render/blocks";
|
|
201
|
+
}, {
|
|
202
|
+
readonly action: "render.preview";
|
|
203
|
+
readonly adminGatedToday: true;
|
|
204
|
+
readonly label: "Render a block preview";
|
|
205
|
+
readonly route: "POST /api/manage/v1/render/block";
|
|
206
|
+
}, {
|
|
207
|
+
readonly action: "settings.read";
|
|
208
|
+
readonly adminGatedToday: false;
|
|
209
|
+
readonly label: "View settings";
|
|
210
|
+
readonly route: "GET /api/manage/v1/settings/render, GET /api/manage/v1/settings/cultures, GET /api/manage/v1/settings/sites";
|
|
211
|
+
}, {
|
|
212
|
+
readonly action: "settings.update";
|
|
213
|
+
readonly adminGatedToday: true;
|
|
214
|
+
readonly label: "Change settings";
|
|
215
|
+
readonly route: "PUT /api/manage/v1/settings/render, PUT /api/manage/v1/settings/cultures, PUT /api/manage/v1/settings/nav";
|
|
216
|
+
}, {
|
|
217
|
+
readonly action: "sites.manage";
|
|
218
|
+
readonly adminGatedToday: true;
|
|
219
|
+
readonly label: "Manage sites";
|
|
220
|
+
readonly route: "GET /api/manage/v1/sites, PUT /api/manage/v1/settings/sites/default, PUT /api/manage/v1/settings/sites/:siteId/hostnames";
|
|
221
|
+
}, {
|
|
222
|
+
readonly action: "sites.read";
|
|
223
|
+
readonly adminGatedToday: true;
|
|
224
|
+
readonly label: "View the sites and their addresses";
|
|
225
|
+
readonly route: "GET /api/v1/sites";
|
|
226
|
+
}, {
|
|
227
|
+
readonly action: "users.read";
|
|
228
|
+
readonly adminGatedToday: true;
|
|
229
|
+
readonly label: "View users";
|
|
230
|
+
readonly route: "GET /api/manage/v1/users";
|
|
231
|
+
}, {
|
|
232
|
+
readonly action: "users.create";
|
|
233
|
+
readonly adminGatedToday: true;
|
|
234
|
+
readonly label: "Invite users";
|
|
235
|
+
readonly keyNote: "A key is refused here: creating a user takes a session, so this matters only to a session's role.";
|
|
236
|
+
readonly route: "POST /api/manage/v1/users";
|
|
237
|
+
}, {
|
|
238
|
+
readonly action: "users.update";
|
|
239
|
+
readonly adminGatedToday: true;
|
|
240
|
+
readonly label: "Change user roles";
|
|
241
|
+
readonly keyNote: "Changes what a person may do by changing their role. A key is refused the admin role.";
|
|
242
|
+
readonly route: "PATCH /api/manage/v1/users/:id/role";
|
|
243
|
+
}, {
|
|
244
|
+
readonly action: "roles.read";
|
|
245
|
+
readonly adminGatedToday: true;
|
|
246
|
+
readonly label: "View roles and the actions they grant";
|
|
247
|
+
readonly route: "GET /api/manage/v1/roles, GET /api/manage/v1/actions";
|
|
248
|
+
}, {
|
|
249
|
+
readonly action: "roles.create";
|
|
250
|
+
readonly adminGatedToday: true;
|
|
251
|
+
readonly label: "Create roles";
|
|
252
|
+
readonly keyNote: "Decides what people may do. Treat it as an administrator's action.";
|
|
253
|
+
readonly route: "POST /api/manage/v1/roles, POST /api/manage/v1/plugins/:pluginId/offered-roles/:roleId";
|
|
254
|
+
}, {
|
|
255
|
+
readonly action: "roles.update";
|
|
256
|
+
readonly adminGatedToday: true;
|
|
257
|
+
readonly label: "Edit a role's label and actions";
|
|
258
|
+
readonly keyNote: "Decides what people may do. Treat it as an administrator's action.";
|
|
259
|
+
readonly route: "PATCH /api/manage/v1/roles/:id";
|
|
260
|
+
}, {
|
|
261
|
+
readonly action: "roles.delete";
|
|
262
|
+
readonly adminGatedToday: true;
|
|
263
|
+
readonly label: "Delete roles";
|
|
264
|
+
readonly route: "DELETE /api/manage/v1/roles/:id";
|
|
265
|
+
}, {
|
|
266
|
+
readonly action: "apiKeys.read";
|
|
267
|
+
readonly adminGatedToday: true;
|
|
268
|
+
readonly label: "View API keys";
|
|
269
|
+
readonly keyNote: "A key is refused here: key routes take a session only, so this matters only to a session's role.";
|
|
270
|
+
readonly route: "GET /api/manage/v1/api-keys";
|
|
271
|
+
}, {
|
|
272
|
+
readonly action: "apiKeys.create";
|
|
273
|
+
readonly adminGatedToday: true;
|
|
274
|
+
readonly label: "Create API keys";
|
|
275
|
+
readonly keyNote: "A key is refused here: key routes take a session only, so this matters only to a session's role.";
|
|
276
|
+
readonly route: "POST /api/manage/v1/api-keys";
|
|
277
|
+
}, {
|
|
278
|
+
readonly action: "apiKeys.revoke";
|
|
279
|
+
readonly adminGatedToday: true;
|
|
280
|
+
readonly label: "Revoke API keys";
|
|
281
|
+
readonly keyNote: "A key is refused here: key routes take a session only, so this matters only to a session's role.";
|
|
282
|
+
readonly route: "POST /api/manage/v1/api-keys/:id/revoke";
|
|
283
|
+
}, {
|
|
284
|
+
readonly action: "apiPlayground.read";
|
|
285
|
+
readonly adminGatedToday: true;
|
|
286
|
+
readonly label: "Use the API playground";
|
|
287
|
+
readonly route: "GET /api/manage/v1/api-playground/openapi";
|
|
288
|
+
}, {
|
|
289
|
+
readonly action: "managementApi.use";
|
|
290
|
+
readonly adminGatedToday: true;
|
|
291
|
+
readonly label: "Let API keys use the management API";
|
|
292
|
+
readonly keyNote: "Lets a key call the management API with the actions it also holds. Never give it to a key that ships in a browser.";
|
|
293
|
+
readonly route: "GET /api/manage/v1/*, POST /api/manage/v1/*, PUT /api/manage/v1/*, PATCH /api/manage/v1/*, DELETE /api/manage/v1/*";
|
|
294
|
+
}, {
|
|
295
|
+
readonly action: "plugins.read";
|
|
296
|
+
readonly adminGatedToday: true;
|
|
297
|
+
readonly label: "View installed plugins";
|
|
298
|
+
readonly route: "GET /api/manage/v1/plugins, GET /api/manage/v1/marketplace/status, GET /api/manage/v1/plugins/:pluginId/snapshot-groups, GET /api/manage/v1/plugins/:pluginId/install-record, GET /api/manage/v1/plugin-docs, GET /api/manage/v1/plugin-docs/search-index, GET /api/manage/v1/plugin-docs/:pluginId/pages/:slug, GET /api/manage/v1/plugin-docs/:pluginId/reference";
|
|
299
|
+
}, {
|
|
300
|
+
readonly action: "plugins.browse";
|
|
301
|
+
readonly adminGatedToday: true;
|
|
302
|
+
readonly label: "Browse the plugin marketplace";
|
|
303
|
+
readonly route: "GET /api/manage/v1/marketplace/listings, GET /api/manage/v1/marketplace/listings/:pluginId";
|
|
304
|
+
}, {
|
|
305
|
+
readonly action: "plugins.install";
|
|
306
|
+
readonly adminGatedToday: true;
|
|
307
|
+
readonly label: "Install plugins";
|
|
308
|
+
readonly keyNote: "Puts code into the server process. An unsigned package is not refused.";
|
|
309
|
+
readonly route: "POST /api/manage/v1/marketplace/install, POST /api/manage/v1/plugins/upload";
|
|
310
|
+
}, {
|
|
311
|
+
readonly action: "plugins.update";
|
|
312
|
+
readonly adminGatedToday: true;
|
|
313
|
+
readonly label: "Enable or disable plugins";
|
|
314
|
+
readonly route: "POST /api/manage/v1/plugins/:pluginId/activate, POST /api/manage/v1/plugins/:pluginId/deactivate, POST /api/manage/v1/plugins/:pluginId/license/recheck";
|
|
315
|
+
}, {
|
|
316
|
+
readonly action: "plugins.delete";
|
|
317
|
+
readonly adminGatedToday: true;
|
|
318
|
+
readonly label: "Uninstall plugins";
|
|
319
|
+
readonly keyNote: "Removes an installed plugin from the site.";
|
|
320
|
+
readonly route: "DELETE /api/manage/v1/plugins/:pluginId";
|
|
321
|
+
}, {
|
|
322
|
+
readonly action: "plugins.restore";
|
|
323
|
+
readonly adminGatedToday: true;
|
|
324
|
+
readonly label: "Restore a plugin from a snapshot";
|
|
325
|
+
readonly route: "POST /api/manage/v1/plugins/:pluginId/snapshot-groups/restore";
|
|
326
|
+
}, {
|
|
327
|
+
readonly action: "snapshots.read";
|
|
328
|
+
readonly adminGatedToday: true;
|
|
329
|
+
readonly label: "View snapshots";
|
|
330
|
+
readonly route: "GET /api/manage/v1/snapshots";
|
|
331
|
+
}, {
|
|
332
|
+
readonly action: "snapshots.create";
|
|
333
|
+
readonly adminGatedToday: true;
|
|
334
|
+
readonly label: "Create snapshots";
|
|
335
|
+
readonly route: "POST /api/manage/v1/snapshots";
|
|
336
|
+
}, {
|
|
337
|
+
readonly action: "snapshots.restore";
|
|
338
|
+
readonly adminGatedToday: true;
|
|
339
|
+
readonly label: "Restore a snapshot";
|
|
340
|
+
readonly route: "POST /api/manage/v1/snapshots/:id/restore";
|
|
341
|
+
}];
|
|
342
|
+
/** Every core action as a literal union, so a mistyped action string is a
|
|
343
|
+
* compile error at the call site rather than a permission nobody holds. */
|
|
344
|
+
export type CoreActionString = (typeof CORE_ACTIONS)[number]["action"];
|
|
345
|
+
export declare const CORE_ACTION_STRINGS: readonly string[];
|
|
346
|
+
/** Whether this is one of core's own actions, as opposed to a plugin's. */
|
|
347
|
+
export declare function isCoreAction(value: string): boolean;
|
|
348
|
+
/** The key-side note of a core action, or null when it has none or is not a core action. */
|
|
349
|
+
export declare function coreKeyNote(action: string): string | null;
|
|
350
|
+
type AssertTrue<T extends true> = T;
|
|
351
|
+
type CoreActionStringIsNarrow = AssertTrue<string extends CoreActionString ? false : true>;
|
|
352
|
+
export type { CoreActionStringIsNarrow };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// Core's own action vocabulary (S270, theme G1).
|
|
2
|
+
//
|
|
3
|
+
// `adminGatedToday` recorded whether the surface this action governs was
|
|
4
|
+
// behind requireAdmin when S270 annotated it. That annotation is not
|
|
5
|
+
// decoration: it is what makes the seeded admin and editor roles DERIVED
|
|
6
|
+
// rather than invented, because requireAdmin was the only thing separating
|
|
7
|
+
// the two roles then. S271 converted those call sites and used this as its
|
|
8
|
+
// checklist. Since S271 the `adminGatedToday: true` routes carry
|
|
9
|
+
// requireAction(<action>), and since S276 and S277 so do all the content rows.
|
|
10
|
+
// Since S298 so do all the document type, data type and template rows.
|
|
11
|
+
// Since S300a so do the asset and settings reads (the app bar's order read
|
|
12
|
+
// excepted on purpose: it is open to every signed-in user and no action's
|
|
13
|
+
// route). Since S300b so do the media rows: no route in the vocabulary asks
|
|
14
|
+
// only for a session. The flag remains what the seeded editor role is derived
|
|
15
|
+
// from.
|
|
16
|
+
// Since S299 the `/api/v1` delivery routes ask the same actions for an API
|
|
17
|
+
// key; the table is in 2026-10-15-s299-tokens-that-carry-actions-design.md
|
|
18
|
+
// section 3.4. Since S300a an API key also needs `managementApi.use`, beside
|
|
19
|
+
// the route's own action, on every route of the management API.
|
|
20
|
+
//
|
|
21
|
+
// Each value was read from the route that serves the action, per route and
|
|
22
|
+
// not per file: content.ts and media.ts mix requireAdmin and requireAuth.
|
|
23
|
+
// Where one verb spans routes with different gates (media trash versus
|
|
24
|
+
// permanent delete) it is split into two actions, so one string never
|
|
25
|
+
// stands for both a gated and an ungated route.
|
|
26
|
+
//
|
|
27
|
+
// `label` exists because nothing ever shows an operator a raw action
|
|
28
|
+
// string. The role editor renders this, the same way CAPABILITY_LABELS
|
|
29
|
+
// renders capabilities.
|
|
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/plugins/:pluginId/storage/:contentId/:fieldId" },
|
|
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
|
+
{ 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
|
+
{ 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
|
+
{ action: "content.delete", adminGatedToday: true, label: "Move content to the trash", route: "DELETE /api/manage/v1/content/:id" },
|
|
36
|
+
{ action: "content.readTrash", adminGatedToday: true, label: "View trashed content", route: "GET /api/manage/v1/content/trash" },
|
|
37
|
+
{ action: "content.restore", adminGatedToday: true, label: "Restore trashed content", route: "POST /api/manage/v1/content/:id/restore" },
|
|
38
|
+
// S278: reading and saving a node's restrictions, and the search for the
|
|
39
|
+
// roles and users a restriction can name. New with the permissions tab, so
|
|
40
|
+
// there was no earlier gate to read; admin-gated because it decides who
|
|
41
|
+
// may reach a page at all.
|
|
42
|
+
{ action: "content.managePermissions", adminGatedToday: true, label: "Manage permissions on content", keyNote: "Reads and changes which roles and users may reach which page.", route: "GET /api/manage/v1/content/:id/permissions, PUT /api/manage/v1/content/:id/permissions, GET /api/manage/v1/content/permission-subjects, DELETE /api/manage/v1/content/:id/restrictions, GET /api/manage/v1/content/:id/explain, GET /api/manage/v1/content/:id/explain-operation, GET /api/manage/v1/content/:id/who-can" },
|
|
43
|
+
{ action: "media.read", adminGatedToday: false, label: "View media", keyNote: "Lists and reads every media file with its versions, references and cuts, private files included, each with a working signed link.", route: "GET /api/manage/v1/media, GET /api/manage/v1/media/:id, GET /api/manage/v1/media/:id/versions, GET /api/manage/v1/media/:id/references, GET /api/manage/v1/media/:id/renditions, GET /api/manage/v1/media/folders" },
|
|
44
|
+
// S303 (2026-10-17-s303-the-api-documented-design.md 3.4): split from media.read. The trash lists reach more
|
|
45
|
+
// than the library does, so a key holding media.read no longer gets them. media.link is the action of the
|
|
46
|
+
// explicit link route only: the reads behind media.read already return a signed downloadUrl for a private
|
|
47
|
+
// file, and that stays. Open to the seeded editor, which trashes and restores and needs to see the bin and
|
|
48
|
+
// copy a link.
|
|
49
|
+
{ action: "media.readTrash", adminGatedToday: false, label: "View the media Recycle Bin", keyNote: "Lists the Recycle Bin and what still uses the trashed files.", route: "GET /api/manage/v1/media/trash, GET /api/manage/v1/media/trash/references" },
|
|
50
|
+
{ action: "media.link", adminGatedToday: false, label: "Create links to media files", keyNote: "Mints a signed link to any media file through the explicit link route. The media reads already return one for a private file.", route: "POST /api/manage/v1/media/:id/link" },
|
|
51
|
+
{ action: "media.create", adminGatedToday: false, label: "Upload media", route: "POST /api/manage/v1/media, POST /api/manage/v1/media/folders, POST /api/manage/v1/media/:id/renditions" },
|
|
52
|
+
{ action: "media.update", adminGatedToday: false, label: "Edit media and media folders", route: "PATCH /api/manage/v1/media/:id, PATCH /api/manage/v1/media/folders/:id, POST /api/manage/v1/media/:id/replace, POST /api/manage/v1/media/:id/versions/:version/make-current, DELETE /api/manage/v1/media/folders/:id" },
|
|
53
|
+
{ action: "media.delete", adminGatedToday: false, label: "Move media to the trash", route: "DELETE /api/manage/v1/media/:id" },
|
|
54
|
+
{ action: "media.restore", adminGatedToday: false, label: "Restore trashed media", route: "POST /api/manage/v1/media/:id/restore" },
|
|
55
|
+
{ action: "media.deletePermanent", adminGatedToday: true, label: "Permanently delete media and media versions", route: "DELETE /api/manage/v1/media/:id/permanent, POST /api/manage/v1/media/trash/empty, DELETE /api/manage/v1/media/:id/versions/:version" },
|
|
56
|
+
{ action: "documentTypes.read", adminGatedToday: false, label: "View document types", route: "GET /api/manage/v1/document-types" },
|
|
57
|
+
{ action: "documentTypes.create", adminGatedToday: false, label: "Create document types", route: "POST /api/manage/v1/document-types" },
|
|
58
|
+
{ action: "documentTypes.update", adminGatedToday: false, label: "Edit document types", route: "PUT /api/manage/v1/document-types/:id, PATCH /api/manage/v1/document-types/:id/default-template" },
|
|
59
|
+
{ action: "documentTypes.delete", adminGatedToday: false, label: "Delete document types", route: "DELETE /api/manage/v1/document-types/:id" },
|
|
60
|
+
{ action: "dataTypes.read", adminGatedToday: false, label: "View data types", route: "GET /api/manage/v1/data-types, GET /api/manage/v1/data-types/:id" },
|
|
61
|
+
{ action: "dataTypes.create", adminGatedToday: false, label: "Create data types", route: "POST /api/manage/v1/data-types" },
|
|
62
|
+
{ action: "dataTypes.update", adminGatedToday: false, label: "Configure data types", route: "PATCH /api/manage/v1/data-types/:id" },
|
|
63
|
+
{ action: "templates.read", adminGatedToday: false, label: "View templates", route: "GET /api/manage/v1/templates, GET /api/manage/v1/templates/:id" },
|
|
64
|
+
{ action: "templates.create", adminGatedToday: true, label: "Create templates", keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.", route: "POST /api/manage/v1/templates" },
|
|
65
|
+
{ action: "templates.update", adminGatedToday: true, label: "Edit templates", keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.", route: "PATCH /api/manage/v1/templates/:id" },
|
|
66
|
+
{ action: "templates.delete", adminGatedToday: true, label: "Delete templates", keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.", route: "DELETE /api/manage/v1/templates/:id" },
|
|
67
|
+
{ action: "templates.sync", adminGatedToday: true, label: "Sync templates from disk", keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.", route: "POST /api/manage/v1/templates/sync" },
|
|
68
|
+
{ action: "assets.read", adminGatedToday: false, label: "View site assets", route: "GET /api/manage/v1/assets/tree, GET /api/manage/v1/assets/content, GET /api/manage/v1/assets/raw" },
|
|
69
|
+
{ action: "assets.create", adminGatedToday: true, label: "Upload site assets and create folders", keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.", route: "POST /api/manage/v1/assets/upload, POST /api/manage/v1/assets/extract-zip, POST /api/manage/v1/assets/folder" },
|
|
70
|
+
{ action: "assets.update", adminGatedToday: true, label: "Edit and rename site assets", keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.", route: "PUT /api/manage/v1/assets/content, PATCH /api/manage/v1/assets/rename" },
|
|
71
|
+
{ action: "assets.delete", adminGatedToday: true, label: "Delete site assets", keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.", route: "DELETE /api/manage/v1/assets" },
|
|
72
|
+
{ action: "assets.sync", adminGatedToday: true, label: "Sync site assets from disk", keyNote: "Changes code the server serves from the admin's own origin: with managementApi.use this is as strong as an admin session.", route: "POST /api/manage/v1/assets/sync" },
|
|
73
|
+
{ action: "render.read", adminGatedToday: true, label: "View text styles and embeddable blocks", route: "GET /api/manage/v1/render/text-styles, GET /api/manage/v1/render/blocks" },
|
|
74
|
+
{ action: "render.preview", adminGatedToday: true, label: "Render a block preview", route: "POST /api/manage/v1/render/block" },
|
|
75
|
+
// S300a: the app bar's order read (GET /api/settings/nav) is open to every signed-in user on purpose (S281) and is no action's route; only its write is settings.update.
|
|
76
|
+
{ 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" },
|
|
77
|
+
{ 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" },
|
|
78
|
+
// S277d: a site's domains and the choice of default site. New with the
|
|
79
|
+
// Site tab, so there was no earlier gate to read; admin-gated because it
|
|
80
|
+
// decides which content every address of the install shows.
|
|
81
|
+
{ action: "sites.manage", adminGatedToday: true, label: "Manage sites", route: "GET /api/manage/v1/sites, PUT /api/manage/v1/settings/sites/default, PUT /api/manage/v1/settings/sites/:siteId/hostnames" },
|
|
82
|
+
// S299: the delivery API's read of the site list (GET /api/v1/sites). Its own
|
|
83
|
+
// action so a key that may read the sites does not hold the power to change
|
|
84
|
+
// them (sites.manage), and does not hold the rest of the settings reads either.
|
|
85
|
+
{ action: "sites.read", adminGatedToday: true, label: "View the sites and their addresses", route: "GET /api/v1/sites" },
|
|
86
|
+
{ action: "users.read", adminGatedToday: true, label: "View users", route: "GET /api/manage/v1/users" },
|
|
87
|
+
{ 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" },
|
|
88
|
+
{ 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" },
|
|
89
|
+
// S272: new with the role editor, so there was no requireAdmin gate to
|
|
90
|
+
// read. Marked admin-gated because granting the role editor to the seeded
|
|
91
|
+
// editor would let that role grant itself anything.
|
|
92
|
+
{ action: "roles.read", adminGatedToday: true, label: "View roles and the actions they grant", route: "GET /api/manage/v1/roles, GET /api/manage/v1/actions" },
|
|
93
|
+
{ action: "roles.create", adminGatedToday: true, label: "Create roles", keyNote: "Decides what people may do. Treat it as an administrator's action.", route: "POST /api/manage/v1/roles, POST /api/manage/v1/plugins/:pluginId/offered-roles/:roleId" },
|
|
94
|
+
{ action: "roles.update", adminGatedToday: true, label: "Edit a role's label and actions", keyNote: "Decides what people may do. Treat it as an administrator's action.", route: "PATCH /api/manage/v1/roles/:id" },
|
|
95
|
+
{ action: "roles.delete", adminGatedToday: true, label: "Delete roles", route: "DELETE /api/manage/v1/roles/:id" },
|
|
96
|
+
{ action: "apiKeys.read", adminGatedToday: true, label: "View API keys", keyNote: "A key is refused here: key routes take a session only, so this matters only to a session's role.", route: "GET /api/manage/v1/api-keys" },
|
|
97
|
+
{ action: "apiKeys.create", adminGatedToday: true, label: "Create API keys", keyNote: "A key is refused here: key routes take a session only, so this matters only to a session's role.", route: "POST /api/manage/v1/api-keys" },
|
|
98
|
+
{ action: "apiKeys.revoke", adminGatedToday: true, label: "Revoke API keys", keyNote: "A key is refused here: key routes take a session only, so this matters only to a session's role.", route: "POST /api/manage/v1/api-keys/:id/revoke" },
|
|
99
|
+
{ action: "apiPlayground.read", adminGatedToday: true, label: "Use the API playground", route: "GET /api/manage/v1/api-playground/openapi" },
|
|
100
|
+
// Row C2 of 2026-10-16-s300a-management-routes-the-structure-side-design.md
|
|
101
|
+
// (section 4b): what an API key must hold, beside the route's own action, to
|
|
102
|
+
// reach any route under /api/manage/v1, hence the wildcard. requireAction
|
|
103
|
+
// asks it of a key only, never of a session. New with the management API, so
|
|
104
|
+
// there was no earlier gate to read; admin-gated so the seeded editor does not
|
|
105
|
+
// hold it and so cannot give it to a key (the subset rule), and no API key
|
|
106
|
+
// preset holds it.
|
|
107
|
+
{
|
|
108
|
+
action: "managementApi.use",
|
|
109
|
+
adminGatedToday: true,
|
|
110
|
+
label: "Let API keys use the management API", keyNote: "Lets a key call the management API with the actions it also holds. Never give it to a key that ships in a browser.",
|
|
111
|
+
route: "GET /api/manage/v1/*, POST /api/manage/v1/*, PUT /api/manage/v1/*, PATCH /api/manage/v1/*, DELETE /api/manage/v1/*",
|
|
112
|
+
},
|
|
113
|
+
{ action: "plugins.read", adminGatedToday: true, label: "View installed plugins", route: "GET /api/manage/v1/plugins, GET /api/manage/v1/marketplace/status, GET /api/manage/v1/plugins/:pluginId/snapshot-groups, GET /api/manage/v1/plugins/:pluginId/install-record, GET /api/manage/v1/plugin-docs, GET /api/manage/v1/plugin-docs/search-index, GET /api/manage/v1/plugin-docs/:pluginId/pages/:slug, GET /api/manage/v1/plugin-docs/:pluginId/reference" },
|
|
114
|
+
{ action: "plugins.browse", adminGatedToday: true, label: "Browse the plugin marketplace", route: "GET /api/manage/v1/marketplace/listings, GET /api/manage/v1/marketplace/listings/:pluginId" },
|
|
115
|
+
{ action: "plugins.install", adminGatedToday: true, label: "Install plugins", keyNote: "Puts code into the server process. An unsigned package is not refused.", route: "POST /api/manage/v1/marketplace/install, POST /api/manage/v1/plugins/upload" },
|
|
116
|
+
{ action: "plugins.update", adminGatedToday: true, label: "Enable or disable plugins", route: "POST /api/manage/v1/plugins/:pluginId/activate, POST /api/manage/v1/plugins/:pluginId/deactivate, POST /api/manage/v1/plugins/:pluginId/license/recheck" },
|
|
117
|
+
{ action: "plugins.delete", adminGatedToday: true, label: "Uninstall plugins", keyNote: "Removes an installed plugin from the site.", route: "DELETE /api/manage/v1/plugins/:pluginId" },
|
|
118
|
+
{ action: "plugins.restore", adminGatedToday: true, label: "Restore a plugin from a snapshot", route: "POST /api/manage/v1/plugins/:pluginId/snapshot-groups/restore" },
|
|
119
|
+
{ action: "snapshots.read", adminGatedToday: true, label: "View snapshots", route: "GET /api/manage/v1/snapshots" },
|
|
120
|
+
{ action: "snapshots.create", adminGatedToday: true, label: "Create snapshots", route: "POST /api/manage/v1/snapshots" },
|
|
121
|
+
{ action: "snapshots.restore", adminGatedToday: true, label: "Restore a snapshot", route: "POST /api/manage/v1/snapshots/:id/restore" },
|
|
122
|
+
];
|
|
123
|
+
export const CORE_ACTION_STRINGS = CORE_ACTIONS.map((entry) => entry.action);
|
|
124
|
+
const CORE_SET = new Set(CORE_ACTION_STRINGS);
|
|
125
|
+
/** Whether this is one of core's own actions, as opposed to a plugin's. */
|
|
126
|
+
export function isCoreAction(value) {
|
|
127
|
+
return CORE_SET.has(value);
|
|
128
|
+
}
|
|
129
|
+
const KEY_NOTES = new Map(CORE_ACTIONS.flatMap((entry) => ("keyNote" in entry ? [[entry.action, entry.keyNote]] : [])));
|
|
130
|
+
/** The key-side note of a core action, or null when it has none or is not a core action. */
|
|
131
|
+
export function coreKeyNote(action) {
|
|
132
|
+
return KEY_NOTES.get(action) ?? null;
|
|
133
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function cultureDirection(code: string): "ltr" | "rtl";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// S231: the one place Kardalum decides whether a language is written right
|
|
2
|
+
// to left. The server puts it on a rendered page's <html>, and the admin
|
|
3
|
+
// puts it on the fields that hold that language's text. Decided by primary
|
|
4
|
+
// subtag, so ar and ar-EG agree without listing every region.
|
|
5
|
+
const RTL_LANGUAGES = new Set(["ar", "he", "fa", "ur", "ps", "sd", "yi", "dv", "ckb"]);
|
|
6
|
+
export function cultureDirection(code) {
|
|
7
|
+
const primary = (code.split("-")[0] ?? "").toLowerCase();
|
|
8
|
+
return RTL_LANGUAGES.has(primary) ? "rtl" : "ltr";
|
|
9
|
+
}
|