@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/entitlement-gate.js
CHANGED
|
@@ -21,7 +21,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
21
21
|
// and term when this browser verified their `termSignature`, otherwise plan
|
|
22
22
|
// unknown, term active.
|
|
23
23
|
import { useEffect, useState } from "react";
|
|
24
|
-
import { highestListingPlan, planFromEnvelope, UNKNOWN_TERM } from "./entitlement-plan.js";
|
|
24
|
+
import { highestListingPlan, lapsedWhenRefunded, planFromEnvelope, UNKNOWN_TERM } from "./entitlement-plan.js";
|
|
25
25
|
import { LICENSE_VERDICT_PUBLIC_KEYS } from "./license-verdict-keys.js";
|
|
26
26
|
import { isLocalHost } from "./local-host.js";
|
|
27
27
|
import { usePluginApi } from "./plugin-context.js";
|
|
@@ -79,6 +79,29 @@ export function canonicalLicenseVerdictTermBytes(envelope) {
|
|
|
79
79
|
: { state: term.state, endsAt: term.endsAt, renewalAmountCents: term.renewalAmountCents, cancelAtPeriodEnd: term.cancelAtPeriodEnd },
|
|
80
80
|
}));
|
|
81
81
|
}
|
|
82
|
+
/** S367d: the bytes `noticeSignature` covers, built the way
|
|
83
|
+
* @kardalum/plugin-package's `canonicalizeLicenseVerdictNotice` builds them
|
|
84
|
+
* (the version 1 fields, then `notice`, null when absent). A copy for the
|
|
85
|
+
* same reason as above; entitlement-gate.test.tsx pins it. */
|
|
86
|
+
export function canonicalLicenseVerdictNoticeBytes(envelope) {
|
|
87
|
+
const notice = envelope.notice;
|
|
88
|
+
return new TextEncoder().encode(JSON.stringify({
|
|
89
|
+
v: envelope.v,
|
|
90
|
+
alg: envelope.alg,
|
|
91
|
+
typ: envelope.typ,
|
|
92
|
+
keyId: envelope.keyId,
|
|
93
|
+
keyHash: envelope.keyHash,
|
|
94
|
+
pluginId: envelope.pluginId,
|
|
95
|
+
domain: envelope.domain,
|
|
96
|
+
nonce: envelope.nonce,
|
|
97
|
+
status: envelope.status,
|
|
98
|
+
reason: envelope.reason ?? null,
|
|
99
|
+
issuedAt: envelope.issuedAt,
|
|
100
|
+
...(envelope.tamper !== undefined ? { tamper: envelope.tamper } : {}),
|
|
101
|
+
...(envelope.detail !== undefined ? { detail: envelope.detail } : {}),
|
|
102
|
+
notice: notice === undefined ? null : { kind: notice.kind, domain: notice.domain, at: notice.at },
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
82
105
|
function base64ToBytes(value) {
|
|
83
106
|
const binary = atob(value);
|
|
84
107
|
const bytes = new Uint8Array(binary.length);
|
|
@@ -185,8 +208,31 @@ export async function verifyTermInBrowser(entitlement, trustedKeys) {
|
|
|
185
208
|
return false;
|
|
186
209
|
return verifyBytesInBrowser(entitlement.envelope.keyId, entitlement.termSignature, canonicalLicenseVerdictTermBytes(entitlement.envelope), trustedKeys);
|
|
187
210
|
}
|
|
188
|
-
|
|
189
|
-
|
|
211
|
+
// The SDK's SERVICE_CLOSING_NOTICE_KIND from @kardalum/api-schemas, which
|
|
212
|
+
// this browser entry does not import at runtime.
|
|
213
|
+
const CLOSING_KIND = "service-closing";
|
|
214
|
+
/** S367d (D14): the browser half of the SDK's `isClosingVerdict`. True when
|
|
215
|
+
* the envelope carries a service-closing notice whose `noticeSignature`
|
|
216
|
+
* verifies; false when it carries none, another kind, no signature or a
|
|
217
|
+
* wrong one; null when this browser cannot check it (the host's answer then
|
|
218
|
+
* stands in). */
|
|
219
|
+
export async function verifyClosingInBrowser(entitlement, trustedKeys) {
|
|
220
|
+
const notice = entitlement.envelope.notice;
|
|
221
|
+
if (typeof notice !== "object" || notice === null)
|
|
222
|
+
return false;
|
|
223
|
+
const n = notice;
|
|
224
|
+
if (n.kind !== CLOSING_KIND || typeof n.domain !== "string" || typeof n.at !== "string")
|
|
225
|
+
return false;
|
|
226
|
+
// S367d fix wave (I1): as isClosingVerdict, a local domain is never closing.
|
|
227
|
+
if (typeof entitlement.envelope.domain !== "string" || isLocalHost(entitlement.envelope.domain))
|
|
228
|
+
return false;
|
|
229
|
+
if (typeof entitlement.noticeSignature !== "string" || entitlement.noticeSignature.length === 0)
|
|
230
|
+
return false;
|
|
231
|
+
return verifyBytesInBrowser(entitlement.envelope.keyId, entitlement.noticeSignature, canonicalLicenseVerdictNoticeBytes(entitlement.envelope), trustedKeys);
|
|
232
|
+
}
|
|
233
|
+
/** The checks after the signature, in the server's order. A closing verdict
|
|
234
|
+
* (S367d) skips the 14-day age, as `requireEntitlement` does. */
|
|
235
|
+
function decide(entitlement, pluginId, now, closing) {
|
|
190
236
|
const { envelope } = entitlement;
|
|
191
237
|
if (envelope.pluginId !== pluginId)
|
|
192
238
|
return { status: "locked", reason: "wrong-plugin", readOnly: false };
|
|
@@ -196,7 +242,7 @@ function decide(entitlement, pluginId, now) {
|
|
|
196
242
|
const nowMs = now.getTime();
|
|
197
243
|
if (!Number.isFinite(issuedMs))
|
|
198
244
|
return { status: "locked", reason: "invalid-signature", readOnly: false };
|
|
199
|
-
if (nowMs - issuedMs > BROWSER_ENTITLEMENT_MAX_AGE_MS)
|
|
245
|
+
if (!closing && nowMs - issuedMs > BROWSER_ENTITLEMENT_MAX_AGE_MS)
|
|
200
246
|
return { status: "locked", reason: "expired", readOnly: false };
|
|
201
247
|
if (issuedMs > nowMs + BROWSER_MAX_VERDICT_AGE_MS)
|
|
202
248
|
return { status: "locked", reason: "expired", readOnly: false };
|
|
@@ -241,12 +287,23 @@ export function useEntitlement(pluginId) {
|
|
|
241
287
|
const authentic = own ?? body.valid === true;
|
|
242
288
|
if (!authentic)
|
|
243
289
|
return { status: "locked", reason: "invalid-signature", readOnly: hostReadOnly };
|
|
244
|
-
|
|
290
|
+
// S367d: where this browser cannot verify, the host's `valid` already
|
|
291
|
+
// answered the age (none for a closing verdict it verified), so a valid
|
|
292
|
+
// host answer on a verdict carrying a closing notice stands in.
|
|
293
|
+
const closingOwn = own === null ? null : await verifyClosingInBrowser(entitlement, LICENSE_VERDICT_PUBLIC_KEYS);
|
|
294
|
+
const closing = closingOwn ?? (body.valid === true && entitlement.envelope.notice?.kind === CLOSING_KIND);
|
|
295
|
+
const decided = decide(entitlement, pluginId, new Date(), closing);
|
|
245
296
|
if (decided.status !== "entitled")
|
|
246
297
|
return { ...decided, readOnly: hostReadOnly };
|
|
247
298
|
const termOk = await verifyTermInBrowser(entitlement, LICENSE_VERDICT_PUBLIC_KEYS);
|
|
248
|
-
|
|
249
|
-
|
|
299
|
+
// Part I6f: a refunded valid answer reads as lapsed, as entitlementPlan does.
|
|
300
|
+
const signedPlan = lapsedWhenRefunded(entitlement.envelope, planFromEnvelope(entitlement.envelope, termOk === true));
|
|
301
|
+
// S367d fix wave (task 10 M5): after closing nobody renews, so a closing
|
|
302
|
+
// verdict's signed term is read against the clock, as entitlementPlan does.
|
|
303
|
+
const endsAt = signedPlan.term.endsAt ? Date.parse(signedPlan.term.endsAt) : Number.NaN;
|
|
304
|
+
const plan = closing && Number.isFinite(endsAt) && Date.now() > endsAt ? { ...signedPlan, term: { ...signedPlan.term, state: "lapsed" } } : signedPlan;
|
|
305
|
+
const refundedValid = entitlement.envelope.status === "valid" && entitlement.envelope.reason === "refunded";
|
|
306
|
+
return { ...decided, plan, readOnly: hostReadOnly || plan.term.state === "lapsed" || refundedValid };
|
|
250
307
|
})()
|
|
251
308
|
.catch(() => ({ status: "locked", reason: "missing", readOnly: false }))
|
|
252
309
|
.then((next) => {
|
|
@@ -19,3 +19,9 @@ export declare function highestListingPlan(plans: readonly ListingPlanSummary[]
|
|
|
19
19
|
* `termVerified` says whether its `termSignature` did too; without it the
|
|
20
20
|
* fields are not trusted and the plan reads as unknown. */
|
|
21
21
|
export declare function planFromEnvelope(envelope: LicenseVerdictEnvelope, termVerified: boolean): EntitlementPlan;
|
|
22
|
+
/** Part I6f: a `valid` answer whose signed `reason` is `refunded` (the
|
|
23
|
+
* licence ended by a refund, and the author's effect keeps the plugin's
|
|
24
|
+
* reads) reads as lapsed, with or without a verified term. `reason` is
|
|
25
|
+
* covered by the base signature, so the caller's verification of that
|
|
26
|
+
* signature is all this needs. Any other envelope keeps its plan. */
|
|
27
|
+
export declare function lapsedWhenRefunded(envelope: LicenseVerdictEnvelope, plan: EntitlementPlan): EntitlementPlan;
|
package/dist/entitlement-plan.js
CHANGED
|
@@ -24,3 +24,13 @@ export function planFromEnvelope(envelope, termVerified) {
|
|
|
24
24
|
return { planId: null, term: { ...UNKNOWN_TERM } };
|
|
25
25
|
return { planId: envelope.planId ?? null, term: envelope.term ? { ...envelope.term } : { ...UNKNOWN_TERM } };
|
|
26
26
|
}
|
|
27
|
+
/** Part I6f: a `valid` answer whose signed `reason` is `refunded` (the
|
|
28
|
+
* licence ended by a refund, and the author's effect keeps the plugin's
|
|
29
|
+
* reads) reads as lapsed, with or without a verified term. `reason` is
|
|
30
|
+
* covered by the base signature, so the caller's verification of that
|
|
31
|
+
* signature is all this needs. Any other envelope keeps its plan. */
|
|
32
|
+
export function lapsedWhenRefunded(envelope, plan) {
|
|
33
|
+
if (envelope.status !== "valid" || envelope.reason !== "refunded")
|
|
34
|
+
return plan;
|
|
35
|
+
return { planId: plan.planId, term: { ...plan.term, state: "lapsed" } };
|
|
36
|
+
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { LicenseVerdictEnvelope, LicenseVerdictTerm } from "@kardalum/plugin-package";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { PluginSettingsReader } from "./providers.js";
|
|
3
|
+
import type { PluginAddressLookup, PluginServerContextBase } from "./structured-storage-types.js";
|
|
4
|
+
import type { PluginMail } from "./mail.js";
|
|
5
|
+
import type { PluginOutbound } from "./outbound.js";
|
|
6
|
+
import type { PluginSealing } from "./sealing.js";
|
|
7
|
+
import type { PluginContentLibrary } from "./content-library.js";
|
|
8
|
+
import type { PluginMediaLibrary } from "./media-library.js";
|
|
4
9
|
export type { LicenseVerdictEnvelope, LicenseVerdictTerm };
|
|
5
10
|
/** A live plan of the plugin's marketplace listing, as the listing API
|
|
6
11
|
* names it (S316). `shape` is "free", "one_time", "monthly" or "yearly". */
|
|
@@ -14,12 +19,15 @@ export interface ListingPlanSummary {
|
|
|
14
19
|
* marketplace signed it, whatever its status: a revoked or invalid one makes
|
|
15
20
|
* `requireEntitlement` answer `not-valid`. `termSignature` (S317) covers the
|
|
16
21
|
* envelope's `planId` and `term`; a host built before S317 hands none, and
|
|
17
|
-
* the plan then reads as unknown.
|
|
22
|
+
* the plan then reads as unknown. S367d: `noticeSignature` covers the
|
|
23
|
+
* verdict's notice; a verified service-closing notice keeps the verdict
|
|
24
|
+
* valid without the 14-day age. */
|
|
18
25
|
export type EntitlementVerdict = {
|
|
19
26
|
kind: "verdict";
|
|
20
27
|
envelope: LicenseVerdictEnvelope;
|
|
21
28
|
signature: string;
|
|
22
29
|
termSignature?: string;
|
|
30
|
+
noticeSignature?: string;
|
|
23
31
|
};
|
|
24
32
|
/** What the host hands a plugin (S284b fix wave: a tagged value, so "no
|
|
25
33
|
* check needed here" and "no verdict" can never be read as each other).
|
|
@@ -45,12 +53,28 @@ export type Entitlement = {
|
|
|
45
53
|
};
|
|
46
54
|
/** Why an entitlement was refused, in the order the checks run. */
|
|
47
55
|
export type EntitlementErrorCode = "missing" | "invalid-signature" | "wrong-plugin" | "not-valid" | "expired";
|
|
48
|
-
/** The context a scheduled task's `run` receives
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
/** The context a scheduled task's `run` receives (M32 F4d, D11): every server context's members (M33 K1), plus the
|
|
57
|
+
* task's own identity and an abort signal. `settings` is always there (a plugin that declares none
|
|
58
|
+
* reads an empty `all()`); `content` and `media` are there for a plugin that declares
|
|
59
|
+
* `contentAccess` and `mediaAccess`. `task.lastRunAt` is the last start the host recorded, an ISO
|
|
60
|
+
* time, or null for a first run. `signal` aborts when the run times out. */
|
|
61
|
+
export interface PluginTaskContext extends Omit<PluginServerContextBase, "settings">, PluginAddressLookup {
|
|
62
|
+
settings: PluginSettingsReader;
|
|
63
|
+
content?: PluginContentLibrary;
|
|
64
|
+
media?: PluginMediaLibrary;
|
|
65
|
+
/** M33 K11: one email to one person, of a kind the manifest declares under `mailKinds` and the
|
|
66
|
+
* site owner switched on. Present only for a plugin that declares `mailKinds`. */
|
|
67
|
+
mail?: PluginMail;
|
|
68
|
+
/** M33 K16: calls web addresses through the server's checked connection (`check`, `request`). Present only
|
|
69
|
+
* for a plugin that declares `outboundRequests`; a call after the plugin is switched off answers `inactive`. */
|
|
70
|
+
outbound?: PluginOutbound;
|
|
71
|
+
/** M33 K17: seals values the plugin makes under a key of its own for each declared kind (`seal`, `open`).
|
|
72
|
+
* Present only for a plugin that declares `sealedValues`; a call after the plugin is switched off answers `inactive`. */
|
|
73
|
+
sealing?: PluginSealing;
|
|
74
|
+
task: {
|
|
75
|
+
id: string;
|
|
76
|
+
slot: string;
|
|
77
|
+
lastRunAt: string | null;
|
|
78
|
+
};
|
|
79
|
+
signal: AbortSignal;
|
|
80
|
+
}
|
package/dist/entitlement.d.ts
CHANGED
|
@@ -2,15 +2,24 @@ import { type LicenseVerdictEnvelope, type TrustedKey } from "@kardalum/plugin-p
|
|
|
2
2
|
import type { EntitlementPlan } from "./entitlement-plan.js";
|
|
3
3
|
import type { Entitlement, EntitlementErrorCode, ListingPlanSummary } from "./entitlement-types.js";
|
|
4
4
|
import type { ScopedStructuredStorage } from "./structured-storage-types.js";
|
|
5
|
+
/** S367d (D7), S367h fix wave (I1): carried by an EntitlementError that
|
|
6
|
+
* requireEntitlement throws, and by no other. The constructor sets it only
|
|
7
|
+
* when given, and only requireEntitlement's body passes it, so a bundle keeps
|
|
8
|
+
* this text exactly when its server entry can reach the check: importing
|
|
9
|
+
* EntitlementError for an instanceof test carries none. The submission door
|
|
10
|
+
* looks for it. A later change to the check bumps the number. */
|
|
11
|
+
export declare const ENTITLEMENT_CHECK_MARKER = "kardalum-entitlement-check:1";
|
|
5
12
|
export declare class EntitlementError extends Error {
|
|
6
13
|
readonly code: EntitlementErrorCode;
|
|
7
14
|
readonly pluginId: string;
|
|
8
|
-
|
|
15
|
+
readonly check?: typeof ENTITLEMENT_CHECK_MARKER;
|
|
16
|
+
constructor(code: EntitlementErrorCode, pluginId: string, check?: typeof ENTITLEMENT_CHECK_MARKER);
|
|
9
17
|
}
|
|
10
18
|
/** True for an `EntitlementError` from ANY copy of this SDK. The host cannot
|
|
11
19
|
* use `instanceof`: a plugin bundles its own copy of the SDK into its server
|
|
12
20
|
* code, so the class it throws is never the host's class. The name and a
|
|
13
|
-
* known code are the contract instead.
|
|
21
|
+
* known code are the contract instead. With or without `check`: a package
|
|
22
|
+
* built before S367d has none. */
|
|
14
23
|
export declare function isEntitlementError(value: unknown): value is EntitlementError;
|
|
15
24
|
/** Where a plugin remembers the newest `issuedAt` it accepted, so a replayed
|
|
16
25
|
* older verdict, or a clock set back, does not pass a second time. */
|
|
@@ -24,6 +33,15 @@ export declare const ENTITLEMENT_FLOOR_TABLE = "kardalum_entitlement_floor";
|
|
|
24
33
|
* The table is defined on first use; a table already defined (by an
|
|
25
34
|
* earlier process, or an earlier floor object) is fine. */
|
|
26
35
|
export declare function structuredStorageFloor(storage: ScopedStructuredStorage): EntitlementFloor;
|
|
36
|
+
/** S367d (D14): true when the verdict's notice is a closing one and its own signature
|
|
37
|
+
* verifies against `keys` (the shipped ones by default). A forged or edited
|
|
38
|
+
* notice changes nothing. The host's entitlement read uses it too, so its
|
|
39
|
+
* `valid` answer skips the 14-day age exactly where this check does. */
|
|
40
|
+
export declare function isClosingVerdict(entitlement: {
|
|
41
|
+
envelope: LicenseVerdictEnvelope;
|
|
42
|
+
signature: string;
|
|
43
|
+
noticeSignature?: string;
|
|
44
|
+
}, keys?: TrustedKey[]): boolean;
|
|
27
45
|
export interface RequireEntitlementOptions {
|
|
28
46
|
pluginId: string;
|
|
29
47
|
now?: Date;
|
|
@@ -32,8 +50,10 @@ export interface RequireEntitlementOptions {
|
|
|
32
50
|
/** The Host the request being served arrived on (a route passes
|
|
33
51
|
* `request.hostname`). With it, `exempt` is honoured only when that host
|
|
34
52
|
* is local (`isLocalHost`); a hook, which serves no request, leaves it
|
|
35
|
-
* out and `exempt` is honoured as handed.
|
|
36
|
-
|
|
53
|
+
* out and `exempt` is honoured as handed. M32 F4c (D1): a template call or
|
|
54
|
+
* head entry passes its context's `requestHost`, which is null for a render
|
|
55
|
+
* with no request (the admin's block preview) and then reads as left out. */
|
|
56
|
+
requestHost?: string | null;
|
|
37
57
|
}
|
|
38
58
|
/**
|
|
39
59
|
* Throws EntitlementError; resolves to the verified envelope, or to null for
|
|
@@ -54,6 +74,9 @@ export interface RequireEntitlementOptions {
|
|
|
54
74
|
* A verdict dated more than a day after the effective now is `expired` too:
|
|
55
75
|
* it is a freshness failure, the same answer the host's own verifier gives
|
|
56
76
|
* a future-dated verdict.
|
|
77
|
+
*
|
|
78
|
+
* A verdict whose service-closing notice verifies skips the 14-day age
|
|
79
|
+
* (S367d, licence terms `updates`); the floor still applies.
|
|
57
80
|
*/
|
|
58
81
|
export declare function requireEntitlement(entitlement: Entitlement | null | undefined, opts: RequireEntitlementOptions): Promise<LicenseVerdictEnvelope | null>;
|
|
59
82
|
/** S318: what `entitlementPlan` needs beside the entitlement. */
|
|
@@ -62,6 +85,8 @@ export interface EntitlementPlanOptions {
|
|
|
62
85
|
pluginId: string;
|
|
63
86
|
listingPlans?: readonly ListingPlanSummary[];
|
|
64
87
|
trustedKeys?: TrustedKey[];
|
|
88
|
+
/** S367d: the clock a closing verdict's term is read against. */
|
|
89
|
+
now?: Date;
|
|
65
90
|
}
|
|
66
91
|
/**
|
|
67
92
|
* S317 (spec 3d): the plan and the term beside `requireEntitlement`, never
|
|
@@ -81,5 +106,7 @@ export interface EntitlementPlanOptions {
|
|
|
81
106
|
*
|
|
82
107
|
* A lapsed or past-due term still comes with a `valid` verdict (S317 D4):
|
|
83
108
|
* reads go on working, and the term is the signal for what to refuse.
|
|
109
|
+
* Part I6f: a `valid` verdict whose reason is `refunded` reads as lapsed;
|
|
110
|
+
* without a verified term, as plan unknown, term lapsed with no end date.
|
|
84
111
|
*/
|
|
85
112
|
export declare function entitlementPlan(entitlement: Entitlement | null | undefined, opts: EntitlementPlanOptions): EntitlementPlan | null;
|
package/dist/entitlement.js
CHANGED
|
@@ -11,25 +11,37 @@
|
|
|
11
11
|
// plugin calls `requireEntitlement` at the top of the work that is its paid
|
|
12
12
|
// value, so an operator who flips the host's database still has to patch
|
|
13
13
|
// signed, watermarked plugin code to get that work for free.
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { SERVICE_CLOSING_NOTICE_KIND } from "@kardalum/api-schemas";
|
|
15
|
+
import { ENTITLEMENT_MAX_AGE_MS, MAX_VERDICT_AGE_MS, verifyLicenseVerdictNotice, verifyLicenseVerdictSignature, } from "@kardalum/plugin-package";
|
|
16
|
+
import { highestListingPlan, lapsedWhenRefunded, planFromEnvelope, UNKNOWN_TERM } from "./entitlement-plan.js";
|
|
16
17
|
import { LICENSE_VERDICT_PUBLIC_KEYS } from "./license-verdict-keys.js";
|
|
17
18
|
import { isLocalHost } from "./local-host.js";
|
|
18
19
|
const ERROR_CODES = ["missing", "invalid-signature", "wrong-plugin", "not-valid", "expired"];
|
|
20
|
+
/** S367d (D7), S367h fix wave (I1): carried by an EntitlementError that
|
|
21
|
+
* requireEntitlement throws, and by no other. The constructor sets it only
|
|
22
|
+
* when given, and only requireEntitlement's body passes it, so a bundle keeps
|
|
23
|
+
* this text exactly when its server entry can reach the check: importing
|
|
24
|
+
* EntitlementError for an instanceof test carries none. The submission door
|
|
25
|
+
* looks for it. A later change to the check bumps the number. */
|
|
26
|
+
export const ENTITLEMENT_CHECK_MARKER = "kardalum-entitlement-check:1";
|
|
19
27
|
export class EntitlementError extends Error {
|
|
20
28
|
code;
|
|
21
29
|
pluginId;
|
|
22
|
-
|
|
30
|
+
check;
|
|
31
|
+
constructor(code, pluginId, check) {
|
|
23
32
|
super(`Plugin "${pluginId}" is not entitled: ${code}`);
|
|
24
33
|
this.name = "EntitlementError";
|
|
25
34
|
this.code = code;
|
|
26
35
|
this.pluginId = pluginId;
|
|
36
|
+
if (check !== undefined)
|
|
37
|
+
this.check = check;
|
|
27
38
|
}
|
|
28
39
|
}
|
|
29
40
|
/** True for an `EntitlementError` from ANY copy of this SDK. The host cannot
|
|
30
41
|
* use `instanceof`: a plugin bundles its own copy of the SDK into its server
|
|
31
42
|
* code, so the class it throws is never the host's class. The name and a
|
|
32
|
-
* known code are the contract instead.
|
|
43
|
+
* known code are the contract instead. With or without `check`: a package
|
|
44
|
+
* built before S367d has none. */
|
|
33
45
|
export function isEntitlementError(value) {
|
|
34
46
|
if (typeof value !== "object" || value === null)
|
|
35
47
|
return false;
|
|
@@ -109,6 +121,20 @@ export function structuredStorageFloor(storage) {
|
|
|
109
121
|
// freshness checks run last, after the plugin id and status, in the order
|
|
110
122
|
// the error codes are documented.
|
|
111
123
|
const END_OF_TIME = new Date(8.64e15);
|
|
124
|
+
/** S367d (D14): true when the verdict's notice is a closing one and its own signature
|
|
125
|
+
* verifies against `keys` (the shipped ones by default). A forged or edited
|
|
126
|
+
* notice changes nothing. The host's entitlement read uses it too, so its
|
|
127
|
+
* `valid` answer skips the 14-day age exactly where this check does. */
|
|
128
|
+
export function isClosingVerdict(entitlement, keys = LICENSE_VERDICT_PUBLIC_KEYS) {
|
|
129
|
+
if (!entitlement.noticeSignature)
|
|
130
|
+
return false;
|
|
131
|
+
// S367d fix wave (I1): a verdict for a local domain is never closing; the
|
|
132
|
+
// marketplace never issues one, and a local site needs none.
|
|
133
|
+
if (typeof entitlement.envelope.domain !== "string" || isLocalHost(entitlement.envelope.domain))
|
|
134
|
+
return false;
|
|
135
|
+
const notice = verifyLicenseVerdictNotice({ envelope: entitlement.envelope, signature: entitlement.signature, noticeSignature: entitlement.noticeSignature }, keys);
|
|
136
|
+
return notice !== null && notice.kind === SERVICE_CLOSING_NOTICE_KIND;
|
|
137
|
+
}
|
|
112
138
|
/**
|
|
113
139
|
* Throws EntitlementError; resolves to the verified envelope, or to null for
|
|
114
140
|
* an `exempt` entitlement (a non-production install, where no licence rule
|
|
@@ -128,42 +154,48 @@ const END_OF_TIME = new Date(8.64e15);
|
|
|
128
154
|
* A verdict dated more than a day after the effective now is `expired` too:
|
|
129
155
|
* it is a freshness failure, the same answer the host's own verifier gives
|
|
130
156
|
* a future-dated verdict.
|
|
157
|
+
*
|
|
158
|
+
* A verdict whose service-closing notice verifies skips the 14-day age
|
|
159
|
+
* (S367d, licence terms `updates`); the floor still applies.
|
|
131
160
|
*/
|
|
132
161
|
export async function requireEntitlement(entitlement, opts) {
|
|
133
162
|
const { pluginId } = opts;
|
|
163
|
+
// The marker reaches a bundle only through this body (I1).
|
|
164
|
+
const fail = (code) => new EntitlementError(code, pluginId, ENTITLEMENT_CHECK_MARKER);
|
|
134
165
|
if (entitlement === null || entitlement === undefined || typeof entitlement !== "object") {
|
|
135
|
-
throw
|
|
166
|
+
throw fail("missing");
|
|
136
167
|
}
|
|
137
168
|
if (entitlement.kind === "exempt") {
|
|
138
|
-
if (opts.requestHost !== undefined && !isLocalHost(opts.requestHost)) {
|
|
139
|
-
throw
|
|
169
|
+
if (opts.requestHost !== undefined && opts.requestHost !== null && !isLocalHost(opts.requestHost)) {
|
|
170
|
+
throw fail("missing");
|
|
140
171
|
}
|
|
141
172
|
return null;
|
|
142
173
|
}
|
|
143
174
|
if (entitlement.kind !== "verdict")
|
|
144
|
-
throw
|
|
145
|
-
const
|
|
175
|
+
throw fail("missing");
|
|
176
|
+
const keys = opts.trustedKeys ?? LICENSE_VERDICT_PUBLIC_KEYS;
|
|
177
|
+
const checked = verifyLicenseVerdictSignature(entitlement, keys, {
|
|
146
178
|
now: END_OF_TIME,
|
|
147
179
|
maxAgeMs: Number.POSITIVE_INFINITY,
|
|
148
180
|
});
|
|
149
181
|
if (!checked.ok)
|
|
150
|
-
throw
|
|
182
|
+
throw fail("invalid-signature");
|
|
151
183
|
const envelope = checked.envelope;
|
|
152
184
|
if (envelope.pluginId !== pluginId)
|
|
153
|
-
throw
|
|
185
|
+
throw fail("wrong-plugin");
|
|
154
186
|
if (envelope.status !== "valid")
|
|
155
|
-
throw
|
|
187
|
+
throw fail("not-valid");
|
|
156
188
|
const issuedMs = Date.parse(envelope.issuedAt);
|
|
157
189
|
const floorValue = opts.floor ? await opts.floor.read() : null;
|
|
158
190
|
const floorMs = floorValue === null ? Number.NaN : Date.parse(floorValue);
|
|
159
191
|
const clockMs = (opts.now ?? new Date()).getTime();
|
|
160
192
|
const effectiveNowMs = Number.isFinite(floorMs) ? Math.max(clockMs, floorMs) : clockMs;
|
|
161
193
|
if (Number.isFinite(floorMs) && issuedMs < floorMs)
|
|
162
|
-
throw
|
|
163
|
-
if (effectiveNowMs - issuedMs > ENTITLEMENT_MAX_AGE_MS)
|
|
164
|
-
throw
|
|
194
|
+
throw fail("expired");
|
|
195
|
+
if (!isClosingVerdict(entitlement, keys) && effectiveNowMs - issuedMs > ENTITLEMENT_MAX_AGE_MS)
|
|
196
|
+
throw fail("expired");
|
|
165
197
|
if (issuedMs > effectiveNowMs + MAX_VERDICT_AGE_MS)
|
|
166
|
-
throw
|
|
198
|
+
throw fail("expired");
|
|
167
199
|
if (opts.floor && (!Number.isFinite(floorMs) || issuedMs > floorMs)) {
|
|
168
200
|
await opts.floor.write(envelope.issuedAt);
|
|
169
201
|
}
|
|
@@ -187,6 +219,8 @@ export async function requireEntitlement(entitlement, opts) {
|
|
|
187
219
|
*
|
|
188
220
|
* A lapsed or past-due term still comes with a `valid` verdict (S317 D4):
|
|
189
221
|
* reads go on working, and the term is the signal for what to refuse.
|
|
222
|
+
* Part I6f: a `valid` verdict whose reason is `refunded` reads as lapsed;
|
|
223
|
+
* without a verified term, as plan unknown, term lapsed with no end date.
|
|
190
224
|
*/
|
|
191
225
|
export function entitlementPlan(entitlement, opts) {
|
|
192
226
|
if (entitlement === null || entitlement === undefined || typeof entitlement !== "object")
|
|
@@ -205,5 +239,12 @@ export function entitlementPlan(entitlement, opts) {
|
|
|
205
239
|
// S318 (S317 rider): the same plugin id and status checks requireEntitlement makes.
|
|
206
240
|
if (envelope.pluginId !== opts.pluginId || envelope.status !== "valid")
|
|
207
241
|
return null;
|
|
208
|
-
|
|
242
|
+
// Part I6f: a refunded valid answer reads as lapsed, the term verified or not.
|
|
243
|
+
const plan = lapsedWhenRefunded(envelope, planFromEnvelope(envelope, envelope.planId !== undefined || envelope.term !== undefined));
|
|
244
|
+
// S367d (D14): after closing nobody renews; the signed term is read against the clock.
|
|
245
|
+
const endsAt = plan.term.endsAt === null || plan.term.endsAt === undefined ? Number.NaN : Date.parse(plan.term.endsAt);
|
|
246
|
+
if (Number.isFinite(endsAt) && (opts.now ?? new Date()).getTime() > endsAt && isClosingVerdict(entitlement, opts.trustedKeys ?? LICENSE_VERDICT_PUBLIC_KEYS)) {
|
|
247
|
+
return { ...plan, term: { ...plan.term, state: "lapsed" } };
|
|
248
|
+
}
|
|
249
|
+
return plan;
|
|
209
250
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DurableHookEntry, HookHandler } from "./manifest.js";
|
|
2
|
+
/** The handler a `hooks` value runs, or null for a value that is neither form. */
|
|
3
|
+
export declare function hookHandlerOf(entry: unknown): HookHandler | null;
|
|
4
|
+
/** Whether a `hooks` value is the durable form. */
|
|
5
|
+
export declare function isDurableHookEntry(entry: unknown): entry is DurableHookEntry;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// M33 K18: a `hooks` value is a handler, or `{ handler, durable: true }`. Every reader of a manifest's
|
|
2
|
+
// hooks goes through these two, so none calls the object form as a function. Both read plain data
|
|
3
|
+
// only and never throw: a getter that throws, or any shape the manifest schema refuses, gives
|
|
4
|
+
// null and false.
|
|
5
|
+
function durableHandlerOf(entry) {
|
|
6
|
+
if (entry === null || typeof entry !== "object" || Array.isArray(entry))
|
|
7
|
+
return null;
|
|
8
|
+
const { handler, durable } = entry;
|
|
9
|
+
return durable === true && typeof handler === "function" ? handler : null;
|
|
10
|
+
}
|
|
11
|
+
/** The handler a `hooks` value runs, or null for a value that is neither form. */
|
|
12
|
+
export function hookHandlerOf(entry) {
|
|
13
|
+
try {
|
|
14
|
+
if (typeof entry === "function")
|
|
15
|
+
return entry;
|
|
16
|
+
return durableHandlerOf(entry);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/** Whether a `hooks` value is the durable form. */
|
|
23
|
+
export function isDurableHookEntry(entry) {
|
|
24
|
+
try {
|
|
25
|
+
return durableHandlerOf(entry) !== null;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
package/dist/host-entry.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { registerPluginSlots, getPluginSection, listPluginSections, listRailEntries, getRailEntry, listDashboardWidgets, resetPluginSlotsForTests, type RegisteredSection, type RegisteredRailEntry, type RegisteredDashboardWidget, } from "./admin-section-registry.js";
|
|
1
|
+
export { registerPluginSlots, getPluginSection, listPluginSections, listRailEntries, getRailEntry, listDashboardWidgets, listEditorPanels, listTreeActions, resetPluginSlotsForTests, type RegisteredSection, type RegisteredRailEntry, type RegisteredDashboardWidget, type RegisteredEditorPanel, type RegisteredTreeAction, } from "./admin-section-registry.js";
|
package/dist/host-entry.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
//
|
|
9
9
|
// Not a stable public API: everything here is @internal and may change in
|
|
10
10
|
// any release without notice.
|
|
11
|
-
export { registerPluginSlots, getPluginSection, listPluginSections, listRailEntries, getRailEntry, listDashboardWidgets, resetPluginSlotsForTests, } from "./admin-section-registry.js";
|
|
11
|
+
export { registerPluginSlots, getPluginSection, listPluginSections, listRailEntries, getRailEntry, listDashboardWidgets, listEditorPanels, listTreeActions, resetPluginSlotsForTests, } from "./admin-section-registry.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
export type { DataTypePlugin, DataTypePluginViews } from "./data-type-plugin.js";
|
|
2
2
|
export type { IconName } from "./icon-name.js";
|
|
3
3
|
export type { DataTypeIssue, DataTypeValidateContext, DataTypeValidateHook, DataTypeValidatorEntry, DataTypeValidatorLookup, } from "./datatype-validation.js";
|
|
4
|
-
export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, PluginInstallContext, PluginUpdateContext, PluginInstallDeclaration, InstallStep, InstallOption, InstallChoice, ResolvedInstallAnswers, HookEvent, HookHandler, PluginHooks, ContentLifecycleHookPayload, PluginHookContext, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, ApiRouteContribution, ScheduledTaskContribution, MediaProcessorContribution, ExposedServiceContribution, BundledTemplateContribution, SerializerContext, CustomFormatContribution, SerializerContribution, PluginContributions, PluginManifestBase, PluginManifest, } from "./manifest.js";
|
|
4
|
+
export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, PluginInstallContext, PluginUpdateContext, PluginInstallDeclaration, InstallStep, InstallOption, InstallChoice, ResolvedInstallAnswers, HookEvent, HookHandler, DurableHookEntry, PluginHookEntry, PluginHooks, ContentLifecycleHookPayload, ContentSaveHookPayload, ContentMoveHookPayload, AuditHookPayload, UserHookPayload, UserLoginHookPayload, MediaHookPayload, SettingsHookPayload, PluginLifecycleHookPayload, HookPayload, PluginHookContext, SiteFallbackContext, PluginServerContextBase, PluginSimpleStorage, PageAddresses, PageAddressTarget, PageAtAddressAnswer, PluginAddressLookup, PublishedPageItem, PublishedPagesPage, ListPublishedPagesOptions, PublishedContent, GetPublishedContentOptions, SiteOfHost, SiteOfHostOptions, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, EditorPanelContribution, TreeActionContribution, ApiRouteContribution, McpToolDeclaration, GraphqlFieldDeclaration, ScheduledTaskContribution, MediaProcessorContribution, ExposedServiceContribution, BundledTemplateContribution, SerializerContext, CustomFormatContribution, SerializerContribution, PluginContributions, FormRepliesContribution, MailKindContribution, HeldEmbedContribution, PluginManifestBase, PluginManifest, } from "./manifest.js";
|
|
5
5
|
export { slotLabel } from "./manifest.js";
|
|
6
|
-
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, isActionGated, type Capability, type CapabilityAudience, type CapabilityLabels, type CapabilityMediation, type CapabilityPayload, } from "./capabilities.js";
|
|
7
|
-
export { BUILT_IN_RAIL_SECTIONS, DATABASE_DIALECTS, PLUGIN_TYPES, TIER1_DIALECTS, CMSPluginSchema, DataTypePluginSchema, validatePluginManifest, type ValidatePluginManifestResult, } from "./manifest-schema.js";
|
|
6
|
+
export { CAPABILITY_IDS, CAPABILITY_LABELS, CAPABILITY_NOTE_WORDS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, derivesCapability, isActionGated, type Capability, type CapabilityAudience, type CapabilityLabels, type CapabilityMediation, type CapabilityPayload, } from "./capabilities.js";
|
|
7
|
+
export { BUILT_IN_RAIL_SECTIONS, DATABASE_DIALECTS, PLUGIN_TYPES, TIER1_DIALECTS, CMSPluginSchema, DataTypePluginSchema, HOOK_EVENTS, validatePluginManifest, type ValidatePluginManifestResult, } from "./manifest-schema.js";
|
|
8
8
|
export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
|
|
9
9
|
export { registerDataType, getDataType, listDataTypes } from "./registry.js";
|
|
10
10
|
export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, ContentHostProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, useContentHost, MANAGE_API, type PluginFetch, type ContentHost, type ContentHostPage, type ContentHostDocumentType, } from "./plugin-context.js";
|
|
11
|
-
export {
|
|
11
|
+
export { NestedField, NestedFieldHostProvider, useNestedFieldHost, type NestedFieldHost, type NestedFieldType } from "./nested-field-host.js";
|
|
12
|
+
export { PluginScreenProvider, PluginTranslateProvider, EditorPanelProvider, TreeActionProvider, usePluginScreen, usePluginEditorPanel, usePluginTreeAction, usePluginTranslate, type EditorPanelContext, type EditorPanelNode, type EditorPanelPage, type PanelProposeOptions, type ProposeResult, type TreeActionContext, type PluginScreenContext, type PluginTranslate, } from "./plugin-screen-context.js";
|
|
13
|
+
export { RESERVED_SDK_VARIABLES, SDK_STRINGS_EN, SdkHostProvider, useSdkString, useAdminDirection, useAdminLanguage, useAdminChromeProps, useSdkLocale, SdkContentLanguageProvider, useContentLanguage, useContentTypingProps, type AdminDirection, type ContentLanguage, type SdkContentLanguageProviderProps, type SdkHostProviderProps, type SdkStringKey, type SdkStringVars, type SdkTranslate, } from "./sdk-strings.js";
|
|
12
14
|
export { SimpleStorageValueProvider } from "./simple-storage-value-provider.js";
|
|
13
15
|
export { EntitlementGate, useEntitlement, type EntitlementStatus, type UseEntitlementResult, } from "./entitlement-gate.js";
|
|
14
16
|
export type { Entitlement, EntitlementErrorCode, EntitlementVerdict, PluginTaskContext, ListingPlanSummary, LicenseVerdictTerm } from "./entitlement-types.js";
|
|
@@ -27,7 +29,39 @@ export { Input, type InputProps } from "@kardalum/ui";
|
|
|
27
29
|
export { Button, type ButtonProps } from "@kardalum/ui";
|
|
28
30
|
export { Switch, type SwitchProps } from "@kardalum/ui";
|
|
29
31
|
export { Badge, type BadgeProps } from "@kardalum/ui";
|
|
32
|
+
export { IconTooltip, type IconTooltipProps } from "@kardalum/ui";
|
|
33
|
+
export { TruncatedText, type TruncatedTextProps } from "@kardalum/ui";
|
|
30
34
|
export { cn } from "@kardalum/ui";
|
|
35
|
+
export { Checkbox, type CheckboxProps } from "@kardalum/ui";
|
|
36
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, } from "@kardalum/ui";
|
|
37
|
+
export { Dialog, DialogTrigger, DialogPortal, DialogOverlay, DialogClose, DialogCloseButton, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from "@kardalum/ui";
|
|
38
|
+
export { DropdownMenu, DropdownMenuContainer, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuGroup, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, } from "@kardalum/ui";
|
|
39
|
+
export { EmptyState, type EmptyStateProps } from "@kardalum/ui";
|
|
40
|
+
export { Skeleton } from "@kardalum/ui";
|
|
41
|
+
export { isMailAddress, canonicalMailAddress, isFormFieldName, MAIL_ADDRESS_MAX } from "@kardalum/api-schemas";
|
|
42
|
+
export { MAIL_SUBJECT_MAX, NOTIFICATION_TITLE_MAX, NOTIFICATION_TEXT_MAX, FORM_REPLY_ADDRESS_FIELDS_MAX, SITE_ROUTE_BODY_LIMIT_BYTES, SITE_ROUTE_FORM_FIELDS_MAX, PLUGIN_MAIL_TEXT_MAX, isPluginMailRef, } from "@kardalum/api-schemas";
|
|
43
|
+
export { PAGE_HEAD_ENTRIES_MAX, PAGE_HEAD_TITLE_MAX, PAGE_HEAD_MEDIA_READS_MAX, PUBLISHED_PAGES_LIMIT_MAX, SITE_ROUTE_ANSWER_LIMIT_BYTES, PLUGIN_TASK_TIME_MS, } from "@kardalum/api-schemas";
|
|
44
|
+
export { HELD_EMBED_TITLE_MAX, HELD_EMBED_SRC_MAX, HELD_EMBED_RATIOS, HELD_EMBED_RATIO_DEFAULT, TEMPLATE_OUTPUT_LIMIT_BYTES, DATA_TYPE_ISSUE_PARAMS_MAX, DATA_TYPE_ISSUE_MESSAGE_MAX, } from "@kardalum/api-schemas";
|
|
45
|
+
export type { HeldEmbedRequest, HeldEmbedRatio } from "@kardalum/api-schemas";
|
|
46
|
+
export { PROTECTION_WIDGET_FALLBACK_MAX, PROTECTION_WIDGET_DATA_MAX, PROTECTION_WIDGET_VALUE_MAX, PROTECTION_FIELDS_MAX, PROTECTION_FIELDS_BYTES_MAX, isProtectionWidgetFallbackText, } from "@kardalum/api-schemas";
|
|
31
47
|
export type { NotificationRefusalReason, PluginNotify, PluginNotifyInput, PluginNotifyResult } from "./notify.js";
|
|
48
|
+
export type { PluginMail, PluginMailInput, PluginMailReason, PluginMailResult, PluginMailState } from "./mail.js";
|
|
49
|
+
export type { OutboundAddressRefusal, OutboundCheckRefusal, OutboundCheckResult, OutboundErrorKind, OutboundInit, OutboundMethod, OutboundRequestsContribution, OutboundResponse, PluginOutbound } from "./outbound.js";
|
|
50
|
+
export { OUTBOUND_ADDRESS_REFUSALS, OUTBOUND_CHECK_IN_FLIGHT_MAX, OUTBOUND_CHECK_REFUSALS, OUTBOUND_ERROR_KINDS, OUTBOUND_HEADERS_MAX, OUTBOUND_HEADER_VALUE_MAX, OUTBOUND_METHODS, OUTBOUND_PLUGIN_IN_FLIGHT_MAX, OUTBOUND_REASON_MAX, OUTBOUND_REDIRECTS_MAX, OUTBOUND_REQUEST_BODY_MAX_BYTES, OUTBOUND_RESPONSE_DEFAULT_BYTES, OUTBOUND_RESPONSE_MAX_BYTES, OUTBOUND_TIMEOUT_DEFAULT_MS, OUTBOUND_TIMEOUT_MAX_MS, OUTBOUND_URL_MAX, OUTBOUND_WAIT_MAX_MS, OutboundError, isOutboundError, } from "@kardalum/api-schemas";
|
|
51
|
+
export { PAGE_ADDRESSES_TARGETS_MAX, RESERVED_ROOT_SLUGS, SITE_LOCATION_MAX, SITE_REDIRECT_MAX_AGE_DEFAULT, SITE_REDIRECT_MAX_AGE_MAX, fallbackPathOf, isReservedRootSlug, joinSiteLocation, siteLocationProblem, } from "@kardalum/api-schemas";
|
|
52
|
+
export type { PluginSealing, SealedValueContribution, SealingRefusalReason } from "./sealing.js";
|
|
53
|
+
export { PLUGIN_SEALED_KINDS_MAX, PLUGIN_SEALED_RECORD_KEY_MAX, PLUGIN_SEALED_VALUE_MAX_BYTES, SEALING_REFUSAL_REASONS, SealingRefusedError, isSealingRefusedError, } from "@kardalum/api-schemas";
|
|
54
|
+
export { hookHandlerOf, isDurableHookEntry } from "./hook-entry.js";
|
|
55
|
+
export type { PluginNotificationKind } from "@kardalum/api-schemas";
|
|
56
|
+
export type { PluginCaller, ProtectionTellWord, ProtectionWidgetInfo } from "@kardalum/api-schemas";
|
|
57
|
+
export type { PluginMediaLibrary, PluginMediaUpload } from "./media-library.js";
|
|
58
|
+
export type { MailSenderContribution, MailSendResult, MediaStoreContribution, OutgoingMail, PluginSecrets, PluginSettingsReader, ProtectionProviderContribution, ProtectionWidgetAnswer, ProtectionWidgetContext, ProviderContext, SearchDocument, SearchProviderContribution, SecretDeclaration, SignInIcon, SignInProfile, SignInProviderContribution } from "./providers.js";
|
|
59
|
+
export { PluginNotActiveError, isPluginNotActiveError, PluginReadOnlyError, isPluginReadOnlyError, PluginPageAccessError, isPluginPageAccessError } from "./providers.js";
|
|
60
|
+
export type { PluginSettingField, PluginSettingValue } from "@kardalum/api-schemas";
|
|
61
|
+
export type { PluginDataTypeConfig } from "@kardalum/api-schemas";
|
|
62
|
+
export type { PluginDocumentType } from "@kardalum/api-schemas";
|
|
32
63
|
export { VENDOR_SERVICE_ERROR_CODES, VendorServiceError, isVendorServiceError } from "./vendor-service.js";
|
|
64
|
+
export { STRUCTURED_DUPLICATE_KEY_CODE, StructuredDuplicateKeyError, isStructuredDuplicateKeyError } from "@kardalum/api-schemas";
|
|
65
|
+
export { TRANSACTION_ROLLED_BACK_CODE, TransactionRolledBackError, isTransactionRolledBackError } from "@kardalum/api-schemas";
|
|
66
|
+
export type { PageAddress, PageAddressState, PluginFieldInfo, PluginFieldShape } from "@kardalum/api-schemas";
|
|
33
67
|
export type { PluginVendorService, VendorServiceErrorCode, VendorServiceRequestInit } from "./vendor-service.js";
|