@kardalum/plugin-sdk 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +253 -0
- package/README.md +20 -1
- package/dist/admin-section-registry.d.ts +16 -1
- package/dist/admin-section-registry.js +23 -0
- package/dist/assets/asset-picker.js +3 -3
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-serializers.js +1 -1
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +90 -4
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +48 -17
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +55 -3
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +22 -0
- package/dist/content-library.d.ts +85 -0
- package/dist/content-library.js +15 -0
- package/dist/content-picker/page-picker-sheet.d.ts +13 -0
- package/dist/content-picker/page-picker-sheet.js +105 -0
- package/dist/content-picker/page-tree.d.ts +25 -0
- package/dist/content-picker/page-tree.js +132 -0
- package/dist/data-type-plugin.d.ts +9 -3
- package/dist/datatype-validation.d.ts +6 -11
- package/dist/datatype-validation.js +141 -3
- package/dist/define-plugin.d.ts +4 -4
- package/dist/define-plugin.js +5 -5
- package/dist/entitlement-entry.d.ts +1 -1
- package/dist/entitlement-entry.js +1 -1
- package/dist/entitlement-gate.d.ts +14 -0
- package/dist/entitlement-gate.js +64 -7
- package/dist/entitlement-plan.d.ts +6 -0
- package/dist/entitlement-plan.js +10 -0
- package/dist/entitlement-types.d.ts +36 -12
- package/dist/entitlement.d.ts +31 -4
- package/dist/entitlement.js +58 -17
- package/dist/hook-entry.d.ts +5 -0
- package/dist/hook-entry.js +30 -0
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +1 -1
- package/dist/index.d.ts +38 -4
- package/dist/index.js +54 -3
- package/dist/mail.d.ts +30 -0
- package/dist/mail.js +1 -0
- package/dist/manifest-entry.d.ts +29 -4
- package/dist/manifest-entry.js +39 -2
- package/dist/manifest-schema.d.ts +443 -29
- package/dist/manifest-schema.js +292 -24
- package/dist/manifest.d.ts +450 -51
- package/dist/manifest.js +1 -1
- package/dist/media/media-picker.js +33 -20
- package/dist/media/upload-error.d.ts +5 -1
- package/dist/media/upload-error.js +14 -2
- package/dist/media-library.d.ts +32 -0
- package/dist/media-library.js +15 -0
- package/dist/nested-field-host.d.ts +76 -0
- package/dist/nested-field-host.js +90 -0
- package/dist/notify.d.ts +12 -4
- package/dist/notify.js +1 -1
- package/dist/outbound.d.ts +47 -0
- package/dist/outbound.js +1 -0
- package/dist/plugin-context.d.ts +5 -0
- package/dist/plugin-context.js +3 -3
- package/dist/plugin-screen-context.d.ts +112 -0
- package/dist/plugin-screen-context.js +26 -0
- package/dist/providers.d.ts +268 -0
- package/dist/providers.js +74 -0
- package/dist/read-all-pages.d.ts +5 -0
- package/dist/read-all-pages.js +3 -2
- package/dist/register-built-ins.js +6 -6
- package/dist/registry.js +1 -1
- package/dist/richtext/block-panel.js +12 -7
- package/dist/richtext/extensions.js +7 -7
- package/dist/richtext/insert-menu.js +12 -9
- package/dist/richtext/style-listbox.js +7 -5
- package/dist/richtext/text-style-class.js +1 -1
- package/dist/sdk-strings.d.ts +285 -0
- package/dist/sdk-strings.js +347 -0
- package/dist/sealing.d.ts +14 -0
- package/dist/sealing.js +1 -0
- package/dist/simple-storage-value-provider.js +27 -27
- package/dist/structured-storage-types.d.ts +309 -9
- package/dist/structured-storage-types.js +2 -2
- package/dist/text-entry.d.ts +1 -0
- package/dist/text-entry.js +6 -0
- package/dist/tokens/tailwind-theme.css +5 -0
- package/dist/tokens/tokens.css +15 -3
- package/dist/tokens/tokens.json +8 -3
- package/dist/ui-entry.js +3 -3
- package/dist/views/asset-view.js +6 -3
- package/dist/views/content-list-preview.js +3 -1
- package/dist/views/content-list-settings-view.js +11 -7
- package/dist/views/content-list-view.d.ts +5 -3
- package/dist/views/content-list-view.js +38 -34
- package/dist/views/content-picker-view.d.ts +3 -0
- package/dist/views/content-picker-view.js +143 -0
- package/dist/views/crop-view.d.ts +4 -6
- package/dist/views/crop-view.js +22 -13
- package/dist/views/date-range-view.js +9 -6
- package/dist/views/file-upload-view.d.ts +5 -7
- package/dist/views/file-upload-view.js +16 -7
- package/dist/views/group-view.d.ts +8 -0
- package/dist/views/group-view.js +123 -0
- package/dist/views/html-code-editor.js +2 -2
- package/dist/views/html-view.js +12 -11
- package/dist/views/image-view.js +40 -22
- package/dist/views/link-view.d.ts +3 -0
- package/dist/views/link-view.js +150 -0
- package/dist/views/options-list-view.d.ts +3 -0
- package/dist/views/options-list-view.js +104 -0
- package/dist/views/repeatable-list-view.d.ts +3 -0
- package/dist/views/repeatable-list-view.js +113 -0
- package/dist/views/rich-text-view.js +32 -16
- package/dist/views/suggest-key.d.ts +17 -0
- package/dist/views/suggest-key.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +215 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +179 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +7 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/auth.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +126 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +116 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +71 -18
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +57 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +137 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +3 -3
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +10 -5
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +7 -4
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +9 -1
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +4 -4
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +267 -12
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +54 -8
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +98 -13
- package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +122 -43
- package/node_modules/@kardalum/api-schemas/dist/index.js +92 -27
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
- package/node_modules/@kardalum/api-schemas/dist/listing-categories.schema.d.ts +46 -0
- package/node_modules/@kardalum/api-schemas/dist/listing-categories.schema.js +52 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +224 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +404 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +359 -8
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +85 -11
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +22 -10
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +9 -5
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +53 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +284 -0
- package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
- package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +42 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +74 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.js +1 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +13 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +38 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +237 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +205 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +357 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +279 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +16 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +34 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +22 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +31 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +310 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +430 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +342 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +400 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +180 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +612 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +50 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +4 -4
- package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +82 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +497 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +91 -1
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +289 -0
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +205 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +121 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +51 -10
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +384 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +616 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +160 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +58 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +35 -4
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
- package/node_modules/@kardalum/api-schemas/package.json +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +8 -2
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +5 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +3 -3
- package/node_modules/@kardalum/design-tokens/dist/theme-css.d.ts +2 -2
- package/node_modules/@kardalum/design-tokens/dist/theme-css.js +2 -2
- package/node_modules/@kardalum/design-tokens/dist/theme-types.d.ts +2 -2
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.d.ts +3 -3
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.js +3 -3
- package/node_modules/@kardalum/design-tokens/dist/themes/light.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/themes/light.js +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +15 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +4 -4
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +17 -8
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +8 -3
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +2 -2
- package/node_modules/@kardalum/design-tokens/dist/types.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +21 -2
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +8 -2
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +355 -22
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +2 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +34 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +47 -5
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +95 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +298 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +27 -5
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +140 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +10 -0
- package/node_modules/@kardalum/plugin-package/dist/envelope.d.ts +2 -2
- package/node_modules/@kardalum/plugin-package/dist/envelope.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +3 -3
- package/node_modules/@kardalum/plugin-package/dist/extract.js +9 -9
- package/node_modules/@kardalum/plugin-package/dist/hash.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/hash.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
- package/node_modules/@kardalum/plugin-package/dist/package-contract.d.ts +2 -2
- package/node_modules/@kardalum/plugin-package/dist/package-contract.js +5 -5
- package/node_modules/@kardalum/plugin-package/dist/types.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.js +8 -3
- package/node_modules/@kardalum/ui/dist/components/badge.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/button.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/dialog.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/dialog.js +49 -4
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.d.ts +5 -1
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +18 -5
- package/node_modules/@kardalum/ui/dist/components/empty-state.d.ts +4 -4
- package/node_modules/@kardalum/ui/dist/components/input.js +6 -1
- package/node_modules/@kardalum/ui/dist/components/property-field.js +3 -3
- package/node_modules/@kardalum/ui/dist/components/sheet.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/sheet.js +12 -7
- package/node_modules/@kardalum/ui/dist/components/skeleton.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/tab-strip.d.ts +3 -3
- package/node_modules/@kardalum/ui/dist/components/toast.js +4 -3
- package/node_modules/@kardalum/ui/dist/components/tooltip.d.ts +27 -0
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +81 -0
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +16 -0
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +95 -0
- package/node_modules/@kardalum/ui/dist/components/use-toast.js +2 -2
- package/node_modules/@kardalum/ui/dist/index.d.ts +3 -1
- package/node_modules/@kardalum/ui/dist/index.js +3 -1
- package/node_modules/@kardalum/ui/dist/lib/menu-host.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/lib/menu-host.js +17 -0
- package/node_modules/@kardalum/ui/package.json +8 -6
- package/package.json +18 -7
package/dist/manifest.d.ts
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import type { ComponentType } from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PluginActionOfferTarget, PluginDataTypeConfig, PluginDocumentType, PluginDocsPage, PluginNotificationKind, PluginInstallDeclaration, PluginLabel, PluginSettingField, PluginVendorServiceDeclaration, ResolvedInstallAnswers } from "@kardalum/api-schemas";
|
|
3
3
|
export type { InstallChoice, InstallOption, InstallStep, PluginInstallDeclaration, ResolvedInstallAnswers } from "@kardalum/api-schemas";
|
|
4
|
+
export type { PluginDataTypeConfig } from "@kardalum/api-schemas";
|
|
4
5
|
import type { ThemeTokenOverrides } from "@kardalum/design-tokens";
|
|
5
6
|
import { VIEW_BEARING_CONTRIBUTIONS, declaresClientBundle } from "@kardalum/plugin-package/reference";
|
|
6
7
|
import type { ZodType } from "zod";
|
|
7
8
|
import type { DataTypePlugin } from "./data-type-plugin.js";
|
|
8
9
|
import type { BUILT_IN_RAIL_SECTIONS } from "./manifest-schema.js";
|
|
9
|
-
import type { PluginApiRouteContext,
|
|
10
|
+
import type { PluginAddressLookup, PluginApiRouteContext, PluginServerContextBase, ScopedStructuredStorage } from "./structured-storage-types.js";
|
|
11
|
+
import type { PluginMail } from "./mail.js";
|
|
12
|
+
import type { OutboundRequestsContribution, PluginOutbound } from "./outbound.js";
|
|
13
|
+
import type { PluginSealing, SealedValueContribution } from "./sealing.js";
|
|
14
|
+
export type { GetPublishedContentOptions, ListPublishedPagesOptions, PageAddresses, PageAddressTarget, PageAtAddressAnswer, PluginAddressLookup, PluginServerContextBase, PluginSimpleStorage, PublishedContent, PublishedPageItem, PublishedPagesPage, SiteOfHost, SiteOfHostOptions } from "./structured-storage-types.js";
|
|
10
15
|
import type { Entitlement, PluginTaskContext } from "./entitlement-types.js";
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
16
|
+
import type { AuditActorKind, HeldEmbedRequest, PageAddress, PageHeadEntry, PluginHeldEmbed, PluginContentAccess, PluginFieldInfo, PluginMediaAccess, SettingsChangeArea, SiteFallbackAnswer, TemplateData } from "@kardalum/api-schemas";
|
|
17
|
+
import type { MailSenderContribution, MediaStoreContribution, PluginSettingsReader, ProtectionProviderContribution, SearchProviderContribution, SecretDeclaration, SignInProviderContribution } from "./providers.js";
|
|
13
18
|
/**
|
|
14
19
|
* The seven plugin types. Since S268 this is a marketplace listing and
|
|
15
20
|
* filter label only: it does not decide which contributions a plugin may
|
|
@@ -120,40 +125,148 @@ export interface PluginMigrationHooks {
|
|
|
120
125
|
afterMigration?: (from: DatabaseDialect, to: DatabaseDialect) => void | Promise<void>;
|
|
121
126
|
validateMigration?: (from: DatabaseDialect, to: DatabaseDialect) => PluginMigrationValidation | Promise<PluginMigrationValidation>;
|
|
122
127
|
}
|
|
123
|
-
/** The events a plugin can hook.
|
|
124
|
-
*
|
|
125
|
-
* content:
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
|
|
128
|
+
/** The events a plugin can hook. Every event in this catalog fires; none is inert (M32 F4c).
|
|
129
|
+
* The content events: content:afterSave (ContentSaveHookPayload), content:afterMove
|
|
130
|
+
* (ContentMoveHookPayload), and content:afterPublish (including rollbacks), content:afterTrash,
|
|
131
|
+
* content:afterRestore and content:afterUnpublish (ContentLifecycleHookPayload). The media events
|
|
132
|
+
* (MediaHookPayload), user:afterCreate and user:afterDelete (UserHookPayload), user:afterLogin
|
|
133
|
+
* (UserLoginHookPayload), settings:afterChange (SettingsHookPayload), the five plugin lifecycle
|
|
134
|
+
* events (PluginLifecycleHookPayload) and audit:afterRecord (AuditHookPayload). */
|
|
135
|
+
export type HookEvent = "content:afterSave" | "content:afterPublish" | "content:afterTrash" | "content:afterRestore" | "content:afterUnpublish" | "content:afterMove" | "media:afterUpload" | "media:afterTrash" | "media:afterDelete" | "user:afterLogin" | "user:afterCreate" | "user:afterDelete" | "settings:afterChange" | "plugin:afterInstall" | "plugin:afterUninstall" | "plugin:afterUpdate" | "plugin:afterActivate" | "plugin:afterDeactivate" | "audit:afterRecord";
|
|
129
136
|
export interface ContentLifecycleHookPayload {
|
|
130
|
-
event: "content:afterPublish" | "content:afterTrash" | "content:afterRestore";
|
|
137
|
+
event: "content:afterPublish" | "content:afterTrash" | "content:afterRestore" | "content:afterUnpublish";
|
|
131
138
|
contentId: string;
|
|
132
139
|
path: string;
|
|
133
140
|
documentTypeId: string;
|
|
134
141
|
occurredAt: string;
|
|
142
|
+
/** M31.5 D (D7): content:afterUnpublish only: every culture that call took off the site. */
|
|
143
|
+
cultures?: string[];
|
|
135
144
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
145
|
+
/** M32 F3: a user was created or deleted. `name` is the stored name, null for a user with none (as the
|
|
146
|
+
* users API answers it). `actorId` is the signed-in user who did it, null when a key or nobody acted. */
|
|
147
|
+
export interface UserHookPayload {
|
|
148
|
+
event: "user:afterCreate" | "user:afterDelete";
|
|
149
|
+
userId: string;
|
|
150
|
+
name: string | null;
|
|
151
|
+
role: string;
|
|
152
|
+
actorId: string | null;
|
|
153
|
+
occurredAt: string;
|
|
154
|
+
}
|
|
155
|
+
/** M32 F4b (D55): a person signed in, with a password or through a sign-in provider. Fired after the
|
|
156
|
+
* session is issued, never for a refresh or a link. `provider` is the provider key
|
|
157
|
+
* (`<pluginId>/<providerId>`) for a provider sign-in and null for a password. Never an email, an
|
|
158
|
+
* address or a token. */
|
|
159
|
+
export interface UserLoginHookPayload {
|
|
160
|
+
event: "user:afterLogin";
|
|
161
|
+
userId: string;
|
|
162
|
+
method: "password" | "provider";
|
|
163
|
+
provider: string | null;
|
|
164
|
+
occurredAt: string;
|
|
165
|
+
}
|
|
166
|
+
/** M32 F3: a media item was uploaded, moved to the trash or deleted for good. */
|
|
167
|
+
export interface MediaHookPayload {
|
|
168
|
+
event: "media:afterUpload" | "media:afterTrash" | "media:afterDelete";
|
|
169
|
+
mediaId: string;
|
|
170
|
+
mimeType: string;
|
|
171
|
+
size?: number;
|
|
172
|
+
occurredAt: string;
|
|
173
|
+
}
|
|
174
|
+
/** M32 F3: a settings area changed. `keys` names what changed, never the values. M32 F4d (D6): in
|
|
175
|
+
* the `plugin` area, `pluginId` names the plugin whose settings changed and `keys` its field ids.
|
|
176
|
+
* M32 H: in the `mail` area, a form reply switch carries the plugin's `pluginId` and `keys: ["on"]`. */
|
|
177
|
+
export interface SettingsHookPayload {
|
|
178
|
+
event: "settings:afterChange";
|
|
179
|
+
area: SettingsChangeArea;
|
|
180
|
+
keys: string[];
|
|
181
|
+
siteId?: string;
|
|
182
|
+
pluginId?: string;
|
|
183
|
+
occurredAt: string;
|
|
184
|
+
}
|
|
185
|
+
/** M32 F3, F4c: a plugin was installed, uninstalled, updated, activated or deactivated. */
|
|
186
|
+
export interface PluginLifecycleHookPayload {
|
|
187
|
+
event: "plugin:afterInstall" | "plugin:afterUninstall" | "plugin:afterUpdate" | "plugin:afterActivate" | "plugin:afterDeactivate";
|
|
188
|
+
pluginId: string;
|
|
189
|
+
version: string;
|
|
190
|
+
/** plugin:afterUpdate only: the version it was updated from. */
|
|
191
|
+
fromVersion?: string;
|
|
192
|
+
occurredAt: string;
|
|
193
|
+
}
|
|
194
|
+
/** M32 F4c: a page was saved. Identifiers only, never a field value. */
|
|
195
|
+
export interface ContentSaveHookPayload {
|
|
196
|
+
event: "content:afterSave";
|
|
197
|
+
contentId: string;
|
|
198
|
+
path: string;
|
|
199
|
+
documentTypeId: string;
|
|
200
|
+
version: number;
|
|
201
|
+
/** The language the save wrote, null for a save of the shared values only. */
|
|
202
|
+
culture: string | null;
|
|
203
|
+
/** True for a page's first version (a create or a copy). */
|
|
204
|
+
created: boolean;
|
|
205
|
+
occurredAt: string;
|
|
206
|
+
}
|
|
207
|
+
/** M32 F4c: a page was moved or renamed. */
|
|
208
|
+
export interface ContentMoveHookPayload {
|
|
209
|
+
event: "content:afterMove";
|
|
210
|
+
contentId: string;
|
|
211
|
+
documentTypeId: string;
|
|
212
|
+
path: string;
|
|
213
|
+
previousPath: string;
|
|
214
|
+
reason: "move" | "rename";
|
|
215
|
+
occurredAt: string;
|
|
216
|
+
}
|
|
217
|
+
/** M32 F4c: an audit entry was recorded. No email, address or person's name. */
|
|
218
|
+
export interface AuditHookPayload {
|
|
219
|
+
event: "audit:afterRecord";
|
|
220
|
+
at: string;
|
|
221
|
+
requestId: string;
|
|
222
|
+
actorKind: AuditActorKind;
|
|
223
|
+
userId: string | null;
|
|
224
|
+
userRole: string | null;
|
|
225
|
+
keyId: string | null;
|
|
226
|
+
keyName: string | null;
|
|
227
|
+
pluginId: string | null;
|
|
228
|
+
method: string;
|
|
229
|
+
route: string;
|
|
230
|
+
action: string | null;
|
|
231
|
+
targetType: string | null;
|
|
232
|
+
targetId: string | null;
|
|
233
|
+
status: number;
|
|
234
|
+
/** Always `{}` in release 1. Route summaries are free-form and some record an email, and no
|
|
235
|
+
* checked list of keys exists yet, so none is handed over; a later release may add allowed keys. */
|
|
236
|
+
summary: Record<string, unknown> | null;
|
|
237
|
+
}
|
|
238
|
+
/** Every payload the hook engine hands a handler. */
|
|
239
|
+
export type HookPayload = ContentLifecycleHookPayload | ContentSaveHookPayload | ContentMoveHookPayload | UserHookPayload | UserLoginHookPayload | MediaHookPayload | SettingsHookPayload | PluginLifecycleHookPayload | AuditHookPayload;
|
|
240
|
+
export interface PluginHookContext extends PluginServerContextBase, PluginAddressLookup {
|
|
241
|
+
/** M33 K19: the id of this occurrence of the event, minted once when it is raised: the same for
|
|
242
|
+
* every plugin that hears it and on every replay of a durable event, so a handler recognises an
|
|
243
|
+
* event it already handled. An id of the occurrence only; it grants nothing. */
|
|
244
|
+
eventId: string;
|
|
245
|
+
/** M33 K11: one email to one person, of a kind the manifest declares under `mailKinds` and the
|
|
246
|
+
* site owner switched on. Present only for a plugin that declares `mailKinds`. */
|
|
247
|
+
mail?: PluginMail;
|
|
248
|
+
/** M33 K16: calls web addresses through the server's checked connection (`check`, `request`). Present only
|
|
249
|
+
* for a plugin that declares `outboundRequests`; a call after the plugin is switched off answers `inactive`. */
|
|
250
|
+
outbound?: PluginOutbound;
|
|
251
|
+
/** M33 K17: seals values the plugin makes under a key of its own for each declared kind (`seal`, `open`).
|
|
252
|
+
* Present only for a plugin that declares `sealedValues`; a call after the plugin is switched off answers `inactive`. */
|
|
253
|
+
sealing?: PluginSealing;
|
|
254
|
+
}
|
|
255
|
+
/** M33 K1: what a site fallback's `resolve` receives. Today the members every server context has;
|
|
256
|
+
* a member a fallback must not get (an event id, a caller) is declared on the other contexts only. */
|
|
257
|
+
export interface SiteFallbackContext extends PluginServerContextBase {
|
|
154
258
|
}
|
|
155
259
|
export type HookHandler = (payload: unknown, context?: PluginHookContext) => void | Promise<void>;
|
|
156
|
-
|
|
260
|
+
/** M33 K18: a hook the host keeps across restarts. Each raised event is stored in the core outbox
|
|
261
|
+
* until the handler settles, tried up to 4 times, delivered at least once (a handler may see one
|
|
262
|
+
* event twice: tell them apart by `context.eventId`). */
|
|
263
|
+
export type DurableHookEntry = {
|
|
264
|
+
handler: HookHandler;
|
|
265
|
+
durable: true;
|
|
266
|
+
};
|
|
267
|
+
/** M33 K18: a `hooks` value: a handler, or a durable one. */
|
|
268
|
+
export type PluginHookEntry = HookHandler | DurableHookEntry;
|
|
269
|
+
export type PluginHooks = Partial<Record<HookEvent, PluginHookEntry>>;
|
|
157
270
|
/** A slot's label: a map of language code to text, `en` required (spec D5).
|
|
158
271
|
* Each key is a language code such as `en`, `de` or `pt-BR`. The admin
|
|
159
272
|
* shows the active language's text, else English; `resolveLabel` in
|
|
@@ -228,6 +341,43 @@ export interface DashboardWidgetContribution {
|
|
|
228
341
|
* plugin cannot declare an action in another's namespace or in core's. */
|
|
229
342
|
action: string;
|
|
230
343
|
}
|
|
344
|
+
/** M32 F3 (D1): a panel shown beside an existing page's editor. Its `view` reads the page through
|
|
345
|
+
* `usePluginEditorPanel()`. `documentTypes` limits it to pages of those document types; leave it
|
|
346
|
+
* out for every type. `id` is 1 to 40 lower-case letters, digits and "-", starting with a letter. */
|
|
347
|
+
export interface EditorPanelContribution {
|
|
348
|
+
id: string;
|
|
349
|
+
label: SlotLabel;
|
|
350
|
+
/** The named permission action a subject must hold to see the panel, prefixed with this plugin's own id. */
|
|
351
|
+
action: string;
|
|
352
|
+
documentTypes?: string[];
|
|
353
|
+
view: ComponentType;
|
|
354
|
+
}
|
|
355
|
+
/** M32 F3 (D7): an item in a content tree row's menu. Its `view` opens in a dialog and reads the
|
|
356
|
+
* row through `usePluginTreeAction()`. The same rules as an editor panel. */
|
|
357
|
+
export interface TreeActionContribution {
|
|
358
|
+
id: string;
|
|
359
|
+
label: SlotLabel;
|
|
360
|
+
/** The named permission action a subject must hold to see the item, prefixed with this plugin's own id. */
|
|
361
|
+
action: string;
|
|
362
|
+
documentTypes?: string[];
|
|
363
|
+
view: ComponentType;
|
|
364
|
+
}
|
|
365
|
+
/** M31.5 D (D1): marks an "apiKey" route as a tool an MCP host may call. */
|
|
366
|
+
export interface McpToolDeclaration {
|
|
367
|
+
/** 1 to 40 lower-case letters, digits and "_", starting with a letter. The host sees
|
|
368
|
+
* `<the plugin id's last segment>_<name>`, for example `commerce_list_orders`. */
|
|
369
|
+
name: string;
|
|
370
|
+
/** 1 to 500 characters: what the tool does and what it answers, for the AI. */
|
|
371
|
+
description: string;
|
|
372
|
+
}
|
|
373
|
+
/** M32 F3b (D12): marks an "apiKey" GET route as a field of the delivery API's GraphQL `Query` type. */
|
|
374
|
+
export interface GraphqlFieldDeclaration {
|
|
375
|
+
/** 1 to 40 lower-case letters, digits and "_", starting with a letter. The query has
|
|
376
|
+
* `<the plugin id's last segment>_<name>`, for example `seo_stats`. */
|
|
377
|
+
name: string;
|
|
378
|
+
/** 1 to 500 characters: what the field answers, for the schema's description. */
|
|
379
|
+
description: string;
|
|
380
|
+
}
|
|
231
381
|
/** Mounted under /api/plugins/:pluginId/… so two plugins can never
|
|
232
382
|
* collide on a path (api-design.md). The host routes every declaration
|
|
233
383
|
* through Fastify's own router, rebuilt whenever a plugin is attached or
|
|
@@ -247,15 +397,15 @@ export interface ApiRouteContribution {
|
|
|
247
397
|
path: string;
|
|
248
398
|
/** Who may call this route.
|
|
249
399
|
* - "admin" (the default when omitted) requires a JWT session whose role
|
|
250
|
-
* holds `action`: for admin-facing plugin UIs like
|
|
251
|
-
* the
|
|
400
|
+
* holds `action`: for admin-facing plugin UIs like a shop's order list or
|
|
401
|
+
* the builder screens of a plugin that keeps its own records.
|
|
252
402
|
* - "apiKey" requires a live API key that holds `action`, for a read and a
|
|
253
403
|
* write alike (S299): for credentialed headless callers like a
|
|
254
404
|
* storefront checkout.
|
|
255
405
|
* - "public" requires NO credentials: for genuinely anonymous browser
|
|
256
|
-
* traffic such as a contact-form submission
|
|
257
|
-
*
|
|
258
|
-
*
|
|
406
|
+
* traffic such as a contact-form submission. A public route owns its
|
|
407
|
+
* own abuse controls (a honeypot, a limit per visitor, body caps; the
|
|
408
|
+
* host's own per-IP ceiling and body limit apply first) and only reaches browsers
|
|
259
409
|
* cross-origin when the operator allowlists their origin in
|
|
260
410
|
* KARDALUM_CORS_ORIGINS.
|
|
261
411
|
* Anything unrecognized falls back to "admin": secure by default. */
|
|
@@ -280,8 +430,14 @@ export interface ApiRouteContribution {
|
|
|
280
430
|
* unknown keys dropped, defaults and transforms applied. A value that
|
|
281
431
|
* does not match answers a 500 and is logged with the problems. A status
|
|
282
432
|
* with no entry is sent unchecked, and so is anything the handler sends
|
|
283
|
-
* through `reply.send`.
|
|
284
|
-
*
|
|
433
|
+
* through `reply.send`. An answer with a status outside 200 to 299, sent
|
|
434
|
+
* or returned, is the plugin's own error body, sent unchecked: an object
|
|
435
|
+
* or array as JSON exactly as given, a string as text and bytes as bytes,
|
|
436
|
+
* up to PLUGIN_ROUTE_ERROR_BODY_LIMIT_BYTES (64 KiB, `@kardalum/api-schemas`);
|
|
437
|
+
* a larger one, or one JSON cannot hold (a cycle, a BigInt), answers the
|
|
438
|
+
* host's own 500 `{ message }`.
|
|
439
|
+
* The schemas also document the response in the server's OpenAPI
|
|
440
|
+
* documents. */
|
|
285
441
|
response?: Record<string, ZodType>;
|
|
286
442
|
};
|
|
287
443
|
/** Third argument added Month 8, Session 90, the first server-side
|
|
@@ -297,13 +453,30 @@ export interface ApiRouteContribution {
|
|
|
297
453
|
* `access` decides WHICH CREDENTIAL reaches the handler; this decides
|
|
298
454
|
* WHAT THAT SUBJECT MAY DO. They are orthogonal. */
|
|
299
455
|
action?: string;
|
|
456
|
+
/** M33 K4: `true` hands the handler `request.rawBody`, a fresh copy of the request's exact
|
|
457
|
+
* bytes as they arrived, beside the parsed `body`, so the route can check a payment
|
|
458
|
+
* provider's signature over them. Only on a POST, PUT or PATCH route. The body limit is the
|
|
459
|
+
* same 64 KiB as every plugin route's (PLUGIN_ROUTE_BODY_LIMIT_BYTES), and every check of the
|
|
460
|
+
* body still runs: the parse, its refusal of prototype poisoning, and `schema.body`. The
|
|
461
|
+
* install screen notes that the route reads the request exactly as sent. */
|
|
462
|
+
rawBody?: true;
|
|
463
|
+
/** M31.5 D (D1, D2): this route as a tool of an MCP host. Only an "apiKey" route can be one;
|
|
464
|
+
* its `action` decides which keys are offered it, and its `schema` (params, querystring and
|
|
465
|
+
* body, each a z.object) is the tool's input, so nothing is declared twice. */
|
|
466
|
+
mcpTool?: McpToolDeclaration;
|
|
467
|
+
/** M32 F3b (D12): this route as a field of the delivery API's GraphQL `Query` type. Only an
|
|
468
|
+
* "apiKey" `GET` route with an `action` and no `:` or `*` in its path can be one; its `schema`
|
|
469
|
+
* `querystring` gives the field's arguments, so nothing is declared twice. */
|
|
470
|
+
graphqlField?: GraphqlFieldDeclaration;
|
|
300
471
|
}
|
|
301
472
|
export interface ScheduledTaskContribution {
|
|
302
473
|
id: string;
|
|
303
474
|
name: PluginLabel;
|
|
304
475
|
/** Standard 5-field cron expression. */
|
|
305
476
|
cron: string;
|
|
306
|
-
|
|
477
|
+
/** M32 F4d (D10, D11): the host runner calls this on the cron's UTC minutes, once across
|
|
478
|
+
* instances, with a full context (settings, secrets, storage, content and media where declared). */
|
|
479
|
+
run: (context: PluginTaskContext) => void | Promise<void>;
|
|
307
480
|
}
|
|
308
481
|
/** Media pipeline processor (thumbnails, optimization). The file/result
|
|
309
482
|
* contract firms up when the BullMQ media pipeline lands. */
|
|
@@ -320,9 +493,8 @@ export interface ExposedServiceContribution {
|
|
|
320
493
|
name: PluginLabel;
|
|
321
494
|
service: unknown;
|
|
322
495
|
}
|
|
323
|
-
/** A ready-made frontend starter shipped alongside a plugin (
|
|
324
|
-
*
|
|
325
|
-
* listing, working site immediately. Packaging lands Month 13. */
|
|
496
|
+
/** A ready-made frontend starter shipped alongside a plugin (a Next.js
|
|
497
|
+
* storefront, say), one marketplace listing, working site immediately. */
|
|
326
498
|
export interface BundledTemplateContribution {
|
|
327
499
|
name: string;
|
|
328
500
|
description?: string;
|
|
@@ -366,6 +538,10 @@ export interface SerializerContext {
|
|
|
366
538
|
id: string;
|
|
367
539
|
name: string;
|
|
368
540
|
};
|
|
541
|
+
/** M33 K21: the document type's fields in order, with what a Group or a list holds, private fields
|
|
542
|
+
* and a field whose data type is gone left out, as `data` leaves them out; `[]` when the type is
|
|
543
|
+
* missing. Each call gets its own frozen copy. */
|
|
544
|
+
fields: ReadonlyArray<Readonly<PluginFieldInfo>>;
|
|
369
545
|
}
|
|
370
546
|
export interface CustomFormatContribution {
|
|
371
547
|
/** Plugin-scoped name, /^[a-z0-9-]+$/, addressed as `<pluginId>:<name>`. */
|
|
@@ -376,15 +552,38 @@ export interface SerializerContribution {
|
|
|
376
552
|
extendContentResponse?: (context: SerializerContext) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
377
553
|
customFormats?: CustomFormatContribution[];
|
|
378
554
|
}
|
|
555
|
+
/** M32 H (H19): what the site owner reads when switching a plugin's form replies on. */
|
|
556
|
+
export interface FormRepliesContribution {
|
|
557
|
+
label: PluginLabel;
|
|
558
|
+
description?: PluginLabel;
|
|
559
|
+
}
|
|
560
|
+
/** M33 K11: one kind of email the plugin sends to one person through `context.mail` (an order
|
|
561
|
+
* confirmation to a buyer), off until the site owner switches it on in Server settings, Email.
|
|
562
|
+
* `id` is a letter, then letters, digits and "_", 1 to 40; the label and description are what
|
|
563
|
+
* the site owner reads beside the switch and on the install screen. */
|
|
564
|
+
export interface MailKindContribution {
|
|
565
|
+
id: string;
|
|
566
|
+
label: PluginLabel;
|
|
567
|
+
description?: PluginLabel;
|
|
568
|
+
}
|
|
379
569
|
export interface PluginContributions {
|
|
380
570
|
/** The Month 3 datatype contract, referenced verbatim: a plugin can
|
|
381
571
|
* ship several field types (id/version on each entry are the
|
|
382
572
|
* datatype's own, distinct from the plugin's). */
|
|
383
573
|
dataTypes?: DataTypePlugin[];
|
|
574
|
+
/** M32 J (J2): data types this plugin's install creates, of any built-in editor or of the plugin's
|
|
575
|
+
* own editors (for example a Group, a Repeatable list, or a picker of its own document types),
|
|
576
|
+
* named, and referred to by name from its document types' fields, from each other and (a picker)
|
|
577
|
+
* to its document types. */
|
|
578
|
+
dataTypeConfigs?: PluginDataTypeConfig[];
|
|
384
579
|
adminSections?: AdminSectionContribution[];
|
|
385
580
|
/** Rail entries in the built-in sections' rails (S280). */
|
|
386
581
|
railEntries?: BuiltInRailEntryContribution[];
|
|
387
582
|
dashboardWidgets?: DashboardWidgetContribution[];
|
|
583
|
+
/** M32 F3 (D1): panels beside an existing page's editor (at most 5). Derives `admin.editorPanel`. */
|
|
584
|
+
editorPanels?: EditorPanelContribution[];
|
|
585
|
+
/** M32 F3 (D7): items in a content tree row's menu (at most 5). Derives `admin.treeAction`. */
|
|
586
|
+
treeActions?: TreeActionContribution[];
|
|
388
587
|
apiRoutes?: ApiRouteContribution[];
|
|
389
588
|
hooks?: PluginHooks;
|
|
390
589
|
scheduledTasks?: ScheduledTaskContribution[];
|
|
@@ -392,8 +591,11 @@ export interface PluginContributions {
|
|
|
392
591
|
exposedServices?: ExposedServiceContribution[];
|
|
393
592
|
serializers?: SerializerContribution;
|
|
394
593
|
/** Document types the plugin provisions at install: the creation shape
|
|
395
|
-
* (server mints ids)
|
|
396
|
-
|
|
594
|
+
* (server mints ids) the admin's builder POSTs, except that a field's
|
|
595
|
+
* `name` and `help` and a tab's `name` may be a label map (M33 K12),
|
|
596
|
+
* resolved in the site's default language when the type is written. The
|
|
597
|
+
* type's own `name` stays a plain string: code names the type by it. */
|
|
598
|
+
documentTypes?: PluginDocumentType[];
|
|
397
599
|
/** Tokens only, never components: the same ThemeTokenOverrides shape
|
|
398
600
|
* the built-in Light/Dark themes use (color scales + radius, enforced
|
|
399
601
|
* structurally by @kardalum/design-tokens). */
|
|
@@ -412,17 +614,203 @@ export interface PluginContributions {
|
|
|
412
614
|
/** Plugin ids installed together, resolved by the marketplace. */
|
|
413
615
|
bundledPlugins?: string[];
|
|
414
616
|
bundledTemplate?: BundledTemplateContribution;
|
|
415
|
-
/**
|
|
416
|
-
* `context.notify` in its hooks
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
|
|
617
|
+
/** M32 G (G1): the kinds of notification the plugin sends to people in the admin through
|
|
618
|
+
* `context.notify` in its hooks, API routes and scheduled tasks. Each kind has an id, a label
|
|
619
|
+
* and an audience of actions and roles (its own offered roles included); a plugin that
|
|
620
|
+
* declares none gets no `notify`, and a send names one of these kinds. It derives the
|
|
621
|
+
* `admin.notifications` capability, which is a promised capability, so a reviewer reads
|
|
622
|
+
* it against your code. */
|
|
623
|
+
notifications?: PluginNotificationKind[];
|
|
624
|
+
/** M31.5 D (D5): a short text for an MCP host on how the plugin's content and tools work,
|
|
625
|
+
* 1 to 2,000 characters. The host receives it while the plugin is active, framed as data with
|
|
626
|
+
* the plugin's name, and the site owner reads it on Settings, AI assistant. It derives no
|
|
627
|
+
* capability: it lets the plugin do nothing. */
|
|
628
|
+
aiContext?: string;
|
|
629
|
+
/** M32 F (D1, D4): the document types this plugin's code may create, read or change through
|
|
630
|
+
* `context.content`, each with the actions it may take and optionally the parent types it may
|
|
631
|
+
* act under. A call outside the list throws ContentAccessRefusedError. The top level of the
|
|
632
|
+
* content tree is never covered. It derives the `content.access` capability. */
|
|
633
|
+
contentAccess?: PluginContentAccess;
|
|
634
|
+
/** M32 F4c (D10): what this plugin's code may do with the media library through
|
|
635
|
+
* `context.media`: `media.read` reads every file, private ones included, and `media.create`
|
|
636
|
+
* adds files. Each action once. It derives the `media.access` capability. */
|
|
637
|
+
mediaAccess?: PluginMediaAccess;
|
|
638
|
+
/** M32 F2 (D2): fixed site addresses the plugin answers (at most 20). Derives `site.route`. */
|
|
639
|
+
siteRoutes?: SiteRouteContribution[];
|
|
640
|
+
/** M32 F2 (D10): answers an address no page holds. Derives `site.fallback`. */
|
|
641
|
+
siteFallback?: SiteFallbackContribution;
|
|
642
|
+
/** M32 F2 (D14): template filters under the plugin's prefix (at most 20). Derives `render.templateFilter`. */
|
|
643
|
+
templateFilters?: TemplateFilterContribution[];
|
|
644
|
+
/** M32 F2 (D14): template tags under the plugin's prefix (at most 20). Derives `render.templateTag`. */
|
|
645
|
+
templateTags?: TemplateTagContribution[];
|
|
646
|
+
/** M32 F2 (D20): entries for every page's head. Derives `render.pageHead`. */
|
|
647
|
+
pageHead?: PageHeadContribution;
|
|
648
|
+
/** M33 K42: content from other sites (at most HELD_EMBEDS_DECLARED_MAX) a template tag may show, held until a visitor clicks: the core writes the placeholder and its words and builds the frame from the declared origin and path prefix only. Derives `render.heldEmbed`. */
|
|
649
|
+
heldEmbeds?: HeldEmbedContribution[];
|
|
650
|
+
/** M32 F4 (D1, D15): form protection providers (at most 3), run after the built-in checks. Derives `provider.formProtection`. */
|
|
651
|
+
protectionProviders?: ProtectionProviderContribution[];
|
|
652
|
+
/** M32 F4 (D1, D19): search providers (at most 3) for the delivery API's `?q=`. Derives `provider.search`. */
|
|
653
|
+
searchProviders?: SearchProviderContribution[];
|
|
654
|
+
/** M32 F4 (D1, D25): media stores (at most 3) the site owner may keep uploaded files in. Derives `provider.mediaStore`. */
|
|
655
|
+
mediaStores?: MediaStoreContribution[];
|
|
656
|
+
/** M32 H (H1): mail senders (at most 3) the site owner may send every email through, instead of the built-in SMTP one. Derives `provider.mail`. */
|
|
657
|
+
mailSenders?: MailSenderContribution[];
|
|
658
|
+
/** M32 H (H19): the plugin may send one reply email to the address a visitor typed into a protected form, once the site owner switches it on. Derives `mail.formReplies`. */
|
|
659
|
+
formReplies?: FormRepliesContribution;
|
|
660
|
+
/** M33 K11: the kinds of email (at most 10) the plugin sends, each to one person, with `context.mail.send` in its hooks, routes, site routes and scheduled tasks. Each kind is off until the site owner switches it on. Derives `mail.direct`, a promised capability: send only to a person a completed transaction or the person's own request names, and never put a visitor's words into an email to someone else. */
|
|
661
|
+
mailKinds?: MailKindContribution[];
|
|
662
|
+
/** M32 F4b (D33): sign-in providers (at most 3) the admin's login page offers, OpenID Connect or OAuth 2, the protocol run by the core. Derives `provider.signIn`. */
|
|
663
|
+
signInProviders?: SignInProviderContribution[];
|
|
664
|
+
/** M33 K16: the plugin may call web addresses through `context.outbound`, the server's checked connection, with the methods it names. Derives `network.outbound`. */
|
|
665
|
+
outboundRequests?: OutboundRequestsContribution;
|
|
666
|
+
/** M33 K17: kinds of value (at most 10) the plugin makes and seals under the server's key with `context.sealing`. Derives `secrets.sealedValues`. */
|
|
667
|
+
sealedValues?: SealedValueContribution[];
|
|
668
|
+
/** M32 F4 (D10): secrets a person enters in the admin (at most 10) and only the plugin's server code reads, with `context.secrets.get`. Derives `secrets`. */
|
|
669
|
+
secrets?: SecretDeclaration[];
|
|
670
|
+
/** M32 F4d (D1): plugin settings fields (at most 32) the core draws, checks, stores and hands back. Derives nothing. */
|
|
671
|
+
settings?: PluginSettingField[];
|
|
672
|
+
}
|
|
673
|
+
export type { TemplateData, PageHeadEntry, SiteFallbackAnswer };
|
|
674
|
+
/**
|
|
675
|
+
* M32 F2 (D2, D3): a fixed site address a plugin answers beside the pages. A GET route has a "." in
|
|
676
|
+
* some segment (a file such as /sitemap.xml) so it is never a page address, and GET also answers HEAD;
|
|
677
|
+
* a POST route takes a form post. The path is outside the server's own addresses (siteRoutePathProblem),
|
|
678
|
+
* and a GET path is no .html or .htm file, which a page or the owner's public/ folder answers. The handler
|
|
679
|
+
* returns its answer or sends one through the reply; one that does neither gets a logged 500.
|
|
680
|
+
*/
|
|
681
|
+
export interface SiteRouteContribution {
|
|
682
|
+
method: "GET" | "POST";
|
|
683
|
+
/** A fixed site address such as "/sitemap.xml" (api-schemas' siteRoutePathProblem). GET also answers HEAD. */
|
|
684
|
+
path: string;
|
|
685
|
+
schema?: {
|
|
686
|
+
querystring?: ZodType;
|
|
687
|
+
body?: ZodType;
|
|
688
|
+
};
|
|
689
|
+
handler: (request: unknown, reply: unknown, context: PluginApiRouteContext) => unknown;
|
|
690
|
+
}
|
|
691
|
+
/** M32 F2 (D10): the address a site fallback is asked about. */
|
|
692
|
+
export interface SiteFallbackAddress {
|
|
693
|
+
path: string;
|
|
694
|
+
query: string;
|
|
695
|
+
host: string;
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* M32 F2 (D10): answers an address no page holds, with a redirect or "gone", or null to leave it
|
|
699
|
+
* unanswered. It is asked within 250 ms (SITE_FALLBACK_TIME_MS) and its answer is checked.
|
|
700
|
+
*/
|
|
701
|
+
export interface SiteFallbackContribution {
|
|
702
|
+
resolve(address: SiteFallbackAddress, context: SiteFallbackContext): SiteFallbackAnswer | null | Promise<SiteFallbackAnswer | null>;
|
|
703
|
+
}
|
|
704
|
+
/** M32 F2 (D15): what a template filter or tag may read while it runs: read-only storage only. */
|
|
705
|
+
export interface TemplateCallContext {
|
|
706
|
+
culture: string | null;
|
|
707
|
+
page: {
|
|
708
|
+
id: string;
|
|
709
|
+
path: string;
|
|
710
|
+
} | null;
|
|
711
|
+
structuredStorage: Pick<ScopedStructuredStorage, "query">;
|
|
712
|
+
/** M32 F4c (D1): the host's licence answer for this plugin; check it with requireEntitlement. */
|
|
713
|
+
entitlement: Entitlement;
|
|
714
|
+
/** M32 F4d (D7): the plugin's settings values, read once a render before the call's time budget starts. */
|
|
715
|
+
settings: PluginSettingsReader;
|
|
716
|
+
/** The host the page is rendered for; null when no request (the block preview). Pass it to requireEntitlement. */
|
|
717
|
+
requestHost: string | null;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* M32 F2 (D14): a template filter, used as <the id's last segment>_<name>. Its value and result are
|
|
721
|
+
* plain data bounded by TEMPLATE_DATA_* and it runs within TEMPLATE_CALL_TIME_MS.
|
|
722
|
+
*/
|
|
723
|
+
export interface TemplateFilterContribution {
|
|
724
|
+
name: string;
|
|
725
|
+
filter(value: TemplateData, args: TemplateData[], context: TemplateCallContext): TemplateData | Promise<TemplateData>;
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* M33 K42: one held embed. `id` (a letter, then letters, digits and "_") names it to a tag's
|
|
729
|
+
* `{ embed }`; `origin` is a bare https origin and `pathPrefix` (starting and ending with "/", no
|
|
730
|
+
* "..", "%2e", "%2f" or "%5c", written as the URL parser writes it) the part of it a frame may come from; `provider` names who the visitor's
|
|
731
|
+
* browser contacts (a label map, English required); `privacyNotice` is the provider's https privacy
|
|
732
|
+
* notice; `kind` picks the core's words (`map`, or the generic `content`); `allow` lists what the
|
|
733
|
+
* frame may use, each once. The rules and limits are api-schemas' (`PluginHeldEmbedSchema` and the
|
|
734
|
+
* HELD_EMBED_* constants), never restated here.
|
|
735
|
+
*/
|
|
736
|
+
export type HeldEmbedContribution = PluginHeldEmbed;
|
|
737
|
+
/**
|
|
738
|
+
* M32 F2 (D16): what a template tag gives back: text the host escapes, or { html } the host sanitizes.
|
|
739
|
+
* M33 K42: or `{ embed, html? }`: held content from one of the plugin's own `heldEmbeds`. The host
|
|
740
|
+
* checks the request against the declarations it copied when the plugin was attached
|
|
741
|
+
* (`heldEmbedRequestProblem`), writes its own placeholder with the visitor words, then the cleaned
|
|
742
|
+
* `html` (a fallback such as a link); the frame is built only after a visitor clicks. A refused
|
|
743
|
+
* request, or one past HELD_EMBEDS_PER_RENDER_MAX in a render, writes only the cleaned `html`.
|
|
744
|
+
*/
|
|
745
|
+
export type TemplateTagOutput = string | {
|
|
746
|
+
html: string;
|
|
747
|
+
} | {
|
|
748
|
+
embed: HeldEmbedRequest;
|
|
749
|
+
html?: string;
|
|
750
|
+
};
|
|
751
|
+
/** M32 F2 (D14, D16): a template tag, named like a filter, with its named arguments as plain data. */
|
|
752
|
+
export interface TemplateTagContribution {
|
|
753
|
+
name: string;
|
|
754
|
+
render(args: Record<string, TemplateData>, context: TemplateCallContext): TemplateTagOutput | Promise<TemplateTagOutput>;
|
|
755
|
+
}
|
|
756
|
+
/** M32 F2 (D24): what the page head function is told about the page being rendered. */
|
|
757
|
+
export interface PageHeadContext {
|
|
758
|
+
culture: string;
|
|
759
|
+
page: {
|
|
760
|
+
id: string;
|
|
761
|
+
path: string;
|
|
762
|
+
documentType: string;
|
|
763
|
+
/** The page's address as the page prints it: short on its own domain; null when no link can be made. */
|
|
764
|
+
url: string | null;
|
|
765
|
+
data: Record<string, TemplateData>;
|
|
766
|
+
/** M33 K25: the page's name as a public read in this language names it; its path segment when it has none. */
|
|
767
|
+
name: string;
|
|
768
|
+
/** M33 K25: the page's canonical address, always a full URL, the one `kardalum.culture.canonical` prints. */
|
|
769
|
+
canonical: string;
|
|
770
|
+
/** M33 K25: the page's full address in each language it is served in, in the site's order; one entry on a page served in one language. */
|
|
771
|
+
alternates: PageAddress[];
|
|
772
|
+
/** M33 K21: the document type's fields in order, with what a Group or a list holds, private fields left out, as `data` leaves them out. */
|
|
773
|
+
fields: PluginFieldInfo[];
|
|
774
|
+
};
|
|
775
|
+
structuredStorage: Pick<ScopedStructuredStorage, "query">;
|
|
776
|
+
/** M32 F4c (D1): the host's licence answer for this plugin; check it with requireEntitlement. */
|
|
777
|
+
entitlement: Entitlement;
|
|
778
|
+
/** M32 F4d (D7): the plugin's settings values, read once a render before the call's time budget starts. */
|
|
779
|
+
settings: PluginSettingsReader;
|
|
780
|
+
/** The host the page is rendered for; null when no request. Pass it to requireEntitlement. */
|
|
781
|
+
requestHost: string | null;
|
|
782
|
+
/** M33 K49: the address of the plugin's own public/ folder at its installed version,
|
|
783
|
+
* `/plugin-assets/<id>/<version>/public/`, with the closing slash. Append a file named by the
|
|
784
|
+
* one rule (letters, digits, `-`, `_`, `.`; 1 to 200 characters; no `.` or `..` segment). */
|
|
785
|
+
assetBase: string;
|
|
786
|
+
/** M33 K26: a public, live media item's address, a full URL on the request's base (the store's
|
|
787
|
+
* own public address when it has one); null for a private, trashed, missing or malformed id, and
|
|
788
|
+
* from the fifth call in one render (PAGE_HEAD_MEDIA_READS_MAX). Never a private file's address. */
|
|
789
|
+
publicMediaUrl(id: string): Promise<string | null>;
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* M32 F2 (D20, D21): entries added to the head of every page. A script or stylesheet comes from the
|
|
793
|
+
* plugin's own files (/plugin-assets/<id>/<version>/public/<file>) or from an origin named in
|
|
794
|
+
* scriptOrigins (at most 10 bare https origins), which the install screen shows; an icon, manifest,
|
|
795
|
+
* preconnect or dns-prefetch link also takes a site path. Every entry is checked by checkPageHeadEntry.
|
|
796
|
+
*
|
|
797
|
+
* M33 K27: with `setsTitle: true`, a `{ tag: "title", text }` entry (1 to PAGE_HEAD_TITLE_MAX, 300,
|
|
798
|
+
* characters, no control character) sets the page's title: the first declaring plugin in id order that
|
|
799
|
+
* gives one wins, and the core writes it, escaped, in place of the text of the layout's first <title> in
|
|
800
|
+
* <head>, or inserts a <title> before </head>. Only on a page whose layout writes {% plugin_head %},
|
|
801
|
+
* never in the on-page editor. A title entry from a plugin without the declaration is dropped and
|
|
802
|
+
* logged. The install screen notes "may set the page title".
|
|
803
|
+
*/
|
|
804
|
+
export interface PageHeadContribution {
|
|
805
|
+
scriptOrigins?: string[];
|
|
806
|
+
setsTitle?: true;
|
|
807
|
+
entries(context: PageHeadContext): PageHeadEntry[] | Promise<PageHeadEntry[]>;
|
|
420
808
|
}
|
|
421
809
|
/**
|
|
422
810
|
* The contributions that put code in the browser, and so the ones that
|
|
423
811
|
* make a plugin ship a client bundle (S267 section 5, implemented by
|
|
424
812
|
* S268 Task 3). `dataTypes`, `adminSections`, `railEntries` (S280) and
|
|
425
|
-
* `dashboardWidgets` carry React views. S313b retired `settingsPages`,
|
|
813
|
+
* `dashboardWidgets`, `editorPanels` and `treeActions` carry React views. S313b retired `settingsPages`,
|
|
426
814
|
* `contentTreeActions` and `editorToolbar`, which no admin screen hosted;
|
|
427
815
|
* the last two return when a host and an editor-handle API are designed.
|
|
428
816
|
*
|
|
@@ -519,8 +907,10 @@ export interface PluginManifestBase {
|
|
|
519
907
|
* is identical for both tiers.
|
|
520
908
|
*/
|
|
521
909
|
signature?: string;
|
|
522
|
-
/** Semver range of
|
|
523
|
-
|
|
910
|
+
/** Semver range of the Kardalum versions this plugin works with. Left out,
|
|
911
|
+
* `kardalum plugin build` writes it from the plugin SDK the plugin is built
|
|
912
|
+
* with (`>=0.20.0 <1.0.0`); an author writes it only to narrow it. */
|
|
913
|
+
cmsVersion?: string;
|
|
524
914
|
/** Ids of plugins this one requires. */
|
|
525
915
|
pluginDependencies?: string[];
|
|
526
916
|
databaseCompatibility: DatabaseCompatibility;
|
|
@@ -546,10 +936,19 @@ export interface PluginManifestBase {
|
|
|
546
936
|
* nothing ever shows an operator a raw action string. A label is a string
|
|
547
937
|
* or a map of language code to text with `en` required (S311); the install
|
|
548
938
|
* stores the text of the site's default language.
|
|
939
|
+
*
|
|
940
|
+
* `offerTo` (M33 K29) offers the action to every role that holds one core
|
|
941
|
+
* action (`PLUGIN_ACTION_OFFER_TARGETS` in @kardalum/api-schemas:
|
|
942
|
+
* `content.read`, `content.update`, `content.publish`, `media.read`), the
|
|
943
|
+
* administrator left out. Never applied unasked: a person who holds
|
|
944
|
+
* `roles.update` and the action accepts it at install (its box is ticked
|
|
945
|
+
* when only panels, sections, widgets and GET routes name the action) or
|
|
946
|
+
* later with Apply under Plugins, Installed, and it adds ordinary grants.
|
|
549
947
|
*/
|
|
550
948
|
actions?: Array<{
|
|
551
949
|
id: string;
|
|
552
950
|
label: PluginLabel;
|
|
951
|
+
offerTo?: PluginActionOfferTarget;
|
|
553
952
|
}>;
|
|
554
953
|
/**
|
|
555
954
|
* Roles this plugin offers (S273). An offer is never applied unasked: the
|
package/dist/manifest.js
CHANGED
|
@@ -13,7 +13,7 @@ export function slotLabel(label, locale) {
|
|
|
13
13
|
* The contributions that put code in the browser, and so the ones that
|
|
14
14
|
* make a plugin ship a client bundle (S267 section 5, implemented by
|
|
15
15
|
* S268 Task 3). `dataTypes`, `adminSections`, `railEntries` (S280) and
|
|
16
|
-
* `dashboardWidgets` carry React views. S313b retired `settingsPages`,
|
|
16
|
+
* `dashboardWidgets`, `editorPanels` and `treeActions` carry React views. S313b retired `settingsPages`,
|
|
17
17
|
* `contentTreeActions` and `editorToolbar`, which no admin screen hosted;
|
|
18
18
|
* the last two return when a host and an editor-handle API are designed.
|
|
19
19
|
*
|