@kardalum/plugin-sdk 0.19.0 → 0.21.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 +281 -0
- package/README.md +19 -0
- package/dist/admin-section-registry.d.ts +48 -1
- package/dist/admin-section-registry.js +90 -0
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +86 -0
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +38 -7
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +101 -4
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +22 -0
- package/dist/consent-entry.d.ts +11 -0
- package/dist/consent-entry.js +18 -0
- package/dist/content-library.d.ts +102 -0
- package/dist/content-library.js +15 -0
- package/dist/content-list-extensions.d.ts +50 -0
- package/dist/content-list-extensions.js +11 -0
- package/dist/content-picker/page-picker-sheet.d.ts +15 -0
- package/dist/content-picker/page-picker-sheet.js +105 -0
- package/dist/content-picker/page-picker.d.ts +18 -0
- package/dist/content-picker/page-picker.js +20 -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 +7 -1
- package/dist/datatype-validation.d.ts +4 -9
- package/dist/datatype-validation.js +147 -1
- package/dist/datatypes-entry.d.ts +1 -0
- package/dist/datatypes-entry.js +2 -0
- 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 +53 -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 +7 -1
- package/dist/host-entry.js +14 -1
- package/dist/index.d.ts +67 -7
- package/dist/index.js +94 -6
- package/dist/mail.d.ts +34 -0
- package/dist/mail.js +1 -0
- package/dist/manifest-entry.d.ts +47 -4
- package/dist/manifest-entry.js +63 -2
- package/dist/manifest-schema.d.ts +993 -40
- package/dist/manifest-schema.js +516 -26
- package/dist/manifest.d.ts +1186 -62
- package/dist/manifest.js +8 -4
- package/dist/media/media-picker.js +31 -18
- 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 +52 -0
- package/dist/plugin-context.js +27 -0
- package/dist/plugin-permissions.d.ts +18 -0
- package/dist/plugin-permissions.js +25 -0
- package/dist/plugin-screen-context.d.ts +262 -9
- package/dist/plugin-screen-context.js +56 -0
- package/dist/providers.d.ts +313 -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/render-page.d.ts +15 -0
- package/dist/render-page.js +20 -0
- package/dist/richtext/block-panel.d.ts +12 -1
- package/dist/richtext/block-panel.js +36 -25
- package/dist/richtext/button-view.d.ts +11 -0
- package/dist/richtext/button-view.js +45 -0
- package/dist/richtext/content-guard.d.ts +4 -0
- package/dist/richtext/content-guard.js +27 -0
- package/dist/richtext/editor-handle.d.ts +34 -0
- package/dist/richtext/editor-handle.js +225 -0
- package/dist/richtext/extensions.d.ts +6 -0
- package/dist/richtext/extensions.js +16 -0
- package/dist/richtext/insert-menu.d.ts +6 -1
- package/dist/richtext/insert-menu.js +45 -22
- package/dist/richtext/item-attributes.d.ts +6 -0
- package/dist/richtext/item-attributes.js +19 -0
- package/dist/richtext/item-panel.d.ts +25 -0
- package/dist/richtext/item-panel.js +118 -0
- package/dist/richtext/item-view.d.ts +58 -0
- package/dist/richtext/item-view.js +172 -0
- package/dist/richtext/mark-form.d.ts +10 -0
- package/dist/richtext/mark-form.js +38 -0
- package/dist/richtext/paste-choice.d.ts +9 -0
- package/dist/richtext/paste-choice.js +13 -0
- package/dist/richtext/plugin-items.d.ts +72 -0
- package/dist/richtext/plugin-items.js +562 -0
- package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
- package/dist/richtext/plugin-mark-tooltips.js +44 -0
- package/dist/richtext/plugin-toolbar.d.ts +57 -0
- package/dist/richtext/plugin-toolbar.js +186 -0
- package/dist/richtext/rich-item-icons.d.ts +5 -0
- package/dist/richtext/rich-item-icons.js +42 -0
- package/dist/richtext/rich-items.d.ts +42 -0
- package/dist/richtext/rich-items.js +68 -0
- package/dist/richtext/rich-text-view-host.d.ts +24 -0
- package/dist/richtext/rich-text-view-host.js +11 -0
- package/dist/richtext/style-listbox.js +6 -4
- package/dist/richtext/toolbar-button.d.ts +16 -0
- package/dist/richtext/toolbar-button.js +9 -0
- package/dist/richtext/url-paste.d.ts +20 -0
- package/dist/richtext/url-paste.js +82 -0
- package/dist/richtext-html-entry.d.ts +5 -0
- package/dist/richtext-html-entry.js +11 -0
- package/dist/sdk-strings.d.ts +344 -0
- package/dist/sdk-strings.js +411 -0
- package/dist/sealing.d.ts +14 -0
- package/dist/sealing.js +1 -0
- package/dist/service-contract.d.ts +17 -0
- package/dist/service-contract.js +39 -0
- package/dist/services.d.ts +114 -0
- package/dist/services.js +1 -0
- package/dist/simple-storage-value-provider.js +24 -24
- package/dist/structured-storage-types.d.ts +429 -9
- package/dist/tailwind.js +10 -5
- package/dist/template-reads.d.ts +16 -0
- package/dist/template-reads.js +21 -0
- package/dist/testing-entry.d.ts +38 -0
- package/dist/testing-entry.js +173 -0
- package/dist/text-entry.d.ts +1 -0
- package/dist/text-entry.js +7 -0
- package/dist/tokens/system-dark.css +1 -0
- package/dist/tokens/tailwind-theme.css +7 -0
- package/dist/tokens/tokens.css +19 -3
- package/dist/tokens/tokens.json +13 -4
- package/dist/uploads.d.ts +43 -0
- package/dist/uploads.js +1 -0
- package/dist/user-library.d.ts +51 -0
- package/dist/user-library.js +15 -0
- package/dist/view-helpers.d.ts +18 -0
- package/dist/view-helpers.js +64 -0
- package/dist/views/asset-view.js +4 -1
- 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 +243 -40
- 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 +4 -1
- 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-view.js +7 -6
- package/dist/views/image-view.js +37 -19
- 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.d.ts +2 -0
- package/dist/views/rich-text-view.js +208 -35
- package/dist/views/suggest-key.d.ts +17 -0
- package/dist/views/suggest-key.js +55 -0
- package/dist/views/unreadable-rich-text.d.ts +17 -0
- package/dist/views/unreadable-rich-text.js +40 -0
- package/dist/visitors.d.ts +81 -0
- package/dist/visitors.js +1 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +334 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +254 -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-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/audit-api.schema.d.ts +11 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +144 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +137 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +178 -2
- 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-reads.schema.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
- 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-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/contribution-issues.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +55 -13
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +22 -10
- 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 +8 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
- 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 +257 -15
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +78 -5
- 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 +90 -5
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
- 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/html-scan.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +162 -48
- package/node_modules/@kardalum/api-schemas/dist/index.js +137 -30
- 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/json-depth.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -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/mail-rules.d.ts +226 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +409 -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 +490 -10
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +53 -3
- 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 +38 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
- 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 +5 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +8 -0
- 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 +60 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +333 -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/page-audience.schema.d.ts +87 -0
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -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-admin-slots.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -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 +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +84 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -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 +44 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +44 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +16 -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 +34 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +126 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -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-guards.d.ts +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +119 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +216 -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 +46 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +41 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +304 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +220 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
- 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 +408 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +307 -23
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +23 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +61 -3
- 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 +23 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +37 -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 +346 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +461 -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-rich-text.d.ts +638 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
- 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-service-call.d.ts +36 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +352 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +409 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +347 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +976 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -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 +47 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
- 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/plugin-uploads.d.ts +96 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -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-cache.d.ts +126 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +307 -4
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +71 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +540 -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 +394 -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 +201 -1
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +97 -8
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +64 -1
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +53 -2
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +386 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +618 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -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/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 +70 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +188 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -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/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 +72 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +36 -3
- 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/dist/visitor-accounts.d.ts +482 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
- package/node_modules/@kardalum/api-schemas/package.json +2 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +15 -1
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +7 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +2 -1
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +19 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +18 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +13 -4
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +5 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +38 -2
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +17 -2
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +625 -35
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +25 -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/contract-fingerprint.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -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/bundle.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
- 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 +47 -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 +40 -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/icons.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +76 -6
- 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 +99 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -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 +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +316 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +40 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
- 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 +150 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -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 +69 -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 +17 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +8 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +7 -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/public-suffix.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
- package/node_modules/@kardalum/plugin-package/package.json +4 -0
- package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
- package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/index.js +2 -0
- package/package.json +25 -3
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** M32 F3 (D1): the most editor panels one plugin may declare. */
|
|
2
|
+
export declare const EDITOR_PANELS_MAX = 5;
|
|
3
|
+
/** M32 F3 (D7): the most tree actions one plugin may declare. */
|
|
4
|
+
export declare const TREE_ACTIONS_MAX = 5;
|
|
5
|
+
/** M32 F3 (D1): the longest editor panel or tree action id. */
|
|
6
|
+
export declare const EDITOR_SLOT_ID_MAX = 40;
|
|
7
|
+
/** M32 F3 (D1): the most document type names one panel or tree action may list. */
|
|
8
|
+
export declare const EDITOR_SLOT_TYPES_MAX = 50;
|
|
9
|
+
/** M32 F3 (D1): the longest document type name a panel or tree action may list. */
|
|
10
|
+
export declare const EDITOR_SLOT_TYPE_NAME_MAX = 100;
|
|
11
|
+
/** M32 F3 (D4): how long the editor waits after the last change before it hands a panel the new values. */
|
|
12
|
+
export declare const EDITOR_PANEL_VALUES_DEBOUNCE_MS = 300;
|
|
13
|
+
/** M32 F4c (D11): the most fields one `propose` call from an editor panel checks; the rest are refused. */
|
|
14
|
+
export declare const PANEL_PROPOSE_FIELDS_MAX = 20;
|
|
15
|
+
/** M32 F4c (D11): the largest value, as UTF-8 JSON, an editor panel may propose for one field. */
|
|
16
|
+
export declare const PANEL_PROPOSE_VALUE_BYTES_MAX = 262144;
|
|
17
|
+
/** M32 F4c (D11): why the editor refused a field an editor panel proposed. */
|
|
18
|
+
export declare const PANEL_PROPOSE_REFUSALS: readonly ["unknownField", "notAllowed", "invalid", "tooLarge", "readOnly", "focused"];
|
|
19
|
+
/** M32 F4c (D11): one reason a proposed field was refused. */
|
|
20
|
+
export type PanelProposeRefusal = (typeof PANEL_PROPOSE_REFUSALS)[number];
|
|
21
|
+
/** M32 F3 (D10): the longest message a tree action's view may show when it closes. */
|
|
22
|
+
export declare const TREE_ACTION_MESSAGE_MAX = 200;
|
|
23
|
+
/** M32 F3 (D14): the settings areas a settings write route reports its change under. M32 F4d (D6):
|
|
24
|
+
* `plugin` is one plugin's own settings, reported with its `pluginId`. M32 H: `mail` is Server
|
|
25
|
+
* settings, Mail (the SMTP settings, and a plugin's form reply switch with its `pluginId`).
|
|
26
|
+
* M35 U2a: visitorAccounts is one site's visitor account settings and the visitor switches of the sign-in providers. */
|
|
27
|
+
export declare const SETTINGS_CHANGE_AREAS: readonly ["render", "cultures", "nav", "aiContext", "sites", "server", "auditRetention", "notificationRetention", "siteReach", "signIn", "plugin", "mail", "visitorAccounts"];
|
|
28
|
+
/** M32 F3 (D14): one settings area. */
|
|
29
|
+
export type SettingsChangeArea = (typeof SETTINGS_CHANGE_AREAS)[number];
|
|
30
|
+
/** M32 F3 (D1): an issue found in a plugin's editor panels or tree actions. */
|
|
31
|
+
export interface EditorExtensionIssue {
|
|
32
|
+
path: (string | number)[];
|
|
33
|
+
message: string;
|
|
34
|
+
}
|
|
35
|
+
/** M32 F3 (D1): true for 1 to 40 lower-case letters, digits and "-", starting with a letter. */
|
|
36
|
+
export declare function isEditorSlotId(value: string): boolean;
|
|
37
|
+
/** The one rule for every slot's `documentTypes` (editor slots, and M35 C2's content slots). */
|
|
38
|
+
export declare function editorSlotDocumentTypesIssue(value: unknown): string | null;
|
|
39
|
+
/** M32 F3 (D1, D7): the shape rules for a manifest's editorPanels and treeActions beyond label, action and view. */
|
|
40
|
+
export declare function checkEditorExtensionDeclarations(manifest: {
|
|
41
|
+
id?: unknown;
|
|
42
|
+
contributions?: unknown;
|
|
43
|
+
}): EditorExtensionIssue[];
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { hasNoControlCharacter } from "./strict-url.js";
|
|
2
|
+
// M32 F3: the rules and limits for what a plugin adds to the content editor
|
|
3
|
+
// and the content tree. An editor panel shows beside an existing page's
|
|
4
|
+
// editor; a tree action adds an item to a tree row's menu. Both name an
|
|
5
|
+
// action (the action machinery in plugin-manifest-actions.ts checks it) and
|
|
6
|
+
// a view (the manifest schema checks it); this module checks the rest. Every
|
|
7
|
+
// character rule below is a loop over a length-capped string, never a
|
|
8
|
+
// pattern match.
|
|
9
|
+
/** M32 F3 (D1): the most editor panels one plugin may declare. */
|
|
10
|
+
export const EDITOR_PANELS_MAX = 5;
|
|
11
|
+
/** M32 F3 (D7): the most tree actions one plugin may declare. */
|
|
12
|
+
export const TREE_ACTIONS_MAX = 5;
|
|
13
|
+
/** M32 F3 (D1): the longest editor panel or tree action id. */
|
|
14
|
+
export const EDITOR_SLOT_ID_MAX = 40;
|
|
15
|
+
/** M32 F3 (D1): the most document type names one panel or tree action may list. */
|
|
16
|
+
export const EDITOR_SLOT_TYPES_MAX = 50;
|
|
17
|
+
/** M32 F3 (D1): the longest document type name a panel or tree action may list. */
|
|
18
|
+
export const EDITOR_SLOT_TYPE_NAME_MAX = 100;
|
|
19
|
+
/** M32 F3 (D4): how long the editor waits after the last change before it hands a panel the new values. */
|
|
20
|
+
export const EDITOR_PANEL_VALUES_DEBOUNCE_MS = 300;
|
|
21
|
+
/** M32 F4c (D11): the most fields one `propose` call from an editor panel checks; the rest are refused. */
|
|
22
|
+
export const PANEL_PROPOSE_FIELDS_MAX = 20;
|
|
23
|
+
/** M32 F4c (D11): the largest value, as UTF-8 JSON, an editor panel may propose for one field. */
|
|
24
|
+
export const PANEL_PROPOSE_VALUE_BYTES_MAX = 262_144;
|
|
25
|
+
/** M32 F4c (D11): why the editor refused a field an editor panel proposed. */
|
|
26
|
+
export const PANEL_PROPOSE_REFUSALS = ["unknownField", "notAllowed", "invalid", "tooLarge", "readOnly", "focused"];
|
|
27
|
+
/** M32 F3 (D10): the longest message a tree action's view may show when it closes. */
|
|
28
|
+
export const TREE_ACTION_MESSAGE_MAX = 200;
|
|
29
|
+
/** M32 F3 (D14): the settings areas a settings write route reports its change under. M32 F4d (D6):
|
|
30
|
+
* `plugin` is one plugin's own settings, reported with its `pluginId`. M32 H: `mail` is Server
|
|
31
|
+
* settings, Mail (the SMTP settings, and a plugin's form reply switch with its `pluginId`).
|
|
32
|
+
* M35 U2a: visitorAccounts is one site's visitor account settings and the visitor switches of the sign-in providers. */
|
|
33
|
+
export const SETTINGS_CHANGE_AREAS = [
|
|
34
|
+
"render", "cultures", "nav", "aiContext", "sites", "server",
|
|
35
|
+
"auditRetention", "notificationRetention", "siteReach", "signIn", "plugin", "mail", "visitorAccounts",
|
|
36
|
+
];
|
|
37
|
+
/** M32 F3 (D1): true for 1 to 40 lower-case letters, digits and "-", starting with a letter. */
|
|
38
|
+
export function isEditorSlotId(value) {
|
|
39
|
+
if (value.length < 1 || value.length > EDITOR_SLOT_ID_MAX)
|
|
40
|
+
return false;
|
|
41
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
42
|
+
const code = value.charCodeAt(index);
|
|
43
|
+
const letter = code >= 0x61 && code <= 0x7a;
|
|
44
|
+
if (index === 0) {
|
|
45
|
+
if (!letter)
|
|
46
|
+
return false;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const digit = code >= 0x30 && code <= 0x39;
|
|
50
|
+
if (!letter && !digit && code !== 0x2d)
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
const KEYS = [
|
|
56
|
+
{ key: "editorPanels", max: EDITOR_PANELS_MAX, noun: "editor panel" },
|
|
57
|
+
{ key: "treeActions", max: TREE_ACTIONS_MAX, noun: "tree action" },
|
|
58
|
+
];
|
|
59
|
+
/** The one rule for every slot's `documentTypes` (editor slots, and M35 C2's content slots). */
|
|
60
|
+
export function editorSlotDocumentTypesIssue(value) {
|
|
61
|
+
if (!Array.isArray(value))
|
|
62
|
+
return "documentTypes must be a list of document type names";
|
|
63
|
+
if (value.length < 1 || value.length > EDITOR_SLOT_TYPES_MAX) {
|
|
64
|
+
return `documentTypes must list 1 to ${EDITOR_SLOT_TYPES_MAX} document type names; leave it out to mean every type`;
|
|
65
|
+
}
|
|
66
|
+
const seen = new Set();
|
|
67
|
+
for (const name of value) {
|
|
68
|
+
if (typeof name !== "string" || name.length < 1 || name.length > EDITOR_SLOT_TYPE_NAME_MAX) {
|
|
69
|
+
return `each document type name must be 1 to ${EDITOR_SLOT_TYPE_NAME_MAX} characters`;
|
|
70
|
+
}
|
|
71
|
+
if (!hasNoControlCharacter(name))
|
|
72
|
+
return "a document type name must hold no control character";
|
|
73
|
+
if (seen.has(name))
|
|
74
|
+
return `document type "${name}" is listed more than once`;
|
|
75
|
+
seen.add(name);
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
/** M32 F3 (D1, D7): the shape rules for a manifest's editorPanels and treeActions beyond label, action and view. */
|
|
80
|
+
export function checkEditorExtensionDeclarations(manifest) {
|
|
81
|
+
const issues = [];
|
|
82
|
+
const contributions = manifest.contributions;
|
|
83
|
+
if (!contributions || typeof contributions !== "object")
|
|
84
|
+
return issues;
|
|
85
|
+
const record = contributions;
|
|
86
|
+
for (const { key, max, noun } of KEYS) {
|
|
87
|
+
if (!(key in record) || record[key] === undefined)
|
|
88
|
+
continue;
|
|
89
|
+
const entries = record[key];
|
|
90
|
+
const keyPath = ["contributions", key];
|
|
91
|
+
if (!Array.isArray(entries)) {
|
|
92
|
+
issues.push({ path: keyPath, message: `${key} must be a list` });
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
if (entries.length > max) {
|
|
96
|
+
issues.push({ path: keyPath, message: `a plugin may declare at most ${max} ${noun}s; this one declares ${entries.length}` });
|
|
97
|
+
}
|
|
98
|
+
const seen = new Set();
|
|
99
|
+
entries.forEach((entry, index) => {
|
|
100
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
101
|
+
issues.push({ path: [...keyPath, index], message: `each ${noun} must be an object` });
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const item = entry;
|
|
105
|
+
const entryId = item.id;
|
|
106
|
+
if (typeof entryId !== "string" || !isEditorSlotId(entryId)) {
|
|
107
|
+
issues.push({
|
|
108
|
+
path: [...keyPath, index, "id"],
|
|
109
|
+
message: `${noun} id must be 1 to ${EDITOR_SLOT_ID_MAX} lower-case letters, digits and "-", starting with a letter`,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
else if (seen.has(entryId)) {
|
|
113
|
+
issues.push({ path: [...keyPath, index, "id"], message: `${noun} "${entryId}" is declared more than once` });
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
seen.add(entryId);
|
|
117
|
+
}
|
|
118
|
+
if ("documentTypes" in item && item.documentTypes !== undefined) {
|
|
119
|
+
const problem = editorSlotDocumentTypesIssue(item.documentTypes);
|
|
120
|
+
if (problem)
|
|
121
|
+
issues.push({ path: [...keyPath, index, "documentTypes"], message: problem });
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return issues;
|
|
126
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** The most field ids a documentType:afterChange event names. */
|
|
2
|
+
export declare const DOCUMENT_TYPE_EVENT_FIELDS_MAX = 100;
|
|
3
|
+
/** The most action names each of role:afterChange's two lists carries. */
|
|
4
|
+
export declare const ROLE_EVENT_ACTIONS_MAX = 200;
|
|
5
|
+
/** The most system:afterError events one instance raises a minute; the rest are counted into the next one's `suppressed`. */
|
|
6
|
+
export declare const SYSTEM_ERROR_EVENTS_PER_MINUTE = 30;
|
|
7
|
+
/** The longest error class name passed on; a longer or stranger name is passed as "Error". */
|
|
8
|
+
export declare const SYSTEM_ERROR_CLASS_MAX = 64;
|
|
9
|
+
/** The longest route pattern passed on in system:afterError; a longer one is cut. */
|
|
10
|
+
export declare const SYSTEM_ERROR_ROUTE_MAX = 200;
|
|
11
|
+
/** How long page views wait in memory before one site:afterPageViews event carries them. */
|
|
12
|
+
export declare const PAGE_VIEW_BATCH_MS = 10000;
|
|
13
|
+
/** The most page and language pairs one site:afterPageViews event itemises; views past it add to `otherViews`. */
|
|
14
|
+
export declare const PAGE_VIEW_BATCH_PAGES_MAX = 500;
|
|
15
|
+
/** The most characters of a user agent the core reads to tell a likely bot; the agent itself is never passed on. */
|
|
16
|
+
export declare const USER_AGENT_SCAN_MAX = 512;
|
|
17
|
+
/** The most languages an address list in an event carries (previousAddresses, addresses). */
|
|
18
|
+
export declare const EVENT_ADDRESSES_MAX = 64;
|
|
19
|
+
/** Lower-case words whose presence in a user agent marks a likely bot. Matched with `includes`. */
|
|
20
|
+
export declare const LIKELY_BOT_MARKERS: readonly ["bot", "crawl", "spider", "slurp", "curl", "wget", "python", "httpclient", "headless", "preview", "facebookexternalhit"];
|
|
21
|
+
/** An error's class name when it is 1 to SYSTEM_ERROR_CLASS_MAX letters, digits or `_`; otherwise "Error". Never the message. */
|
|
22
|
+
export declare function errorClassOf(value: unknown): string;
|
|
23
|
+
/** Whether a request's user agent reads as a bot, a script or nothing at all. Reads at most USER_AGENT_SCAN_MAX characters. */
|
|
24
|
+
export declare function isLikelyBotAgent(userAgent: unknown): boolean;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// M35 B2 (W30, W31, W4): the limits of the events the core raises beyond the content ones, and the
|
|
2
|
+
// two readers the server uses to build their payloads. Every reader here is a linear scan over a
|
|
3
|
+
// bounded length; none uses a regular expression, because the values come from outside (an error a
|
|
4
|
+
// plugin threw, a visitor's user agent).
|
|
5
|
+
/** The most field ids a documentType:afterChange event names. */
|
|
6
|
+
export const DOCUMENT_TYPE_EVENT_FIELDS_MAX = 100;
|
|
7
|
+
/** The most action names each of role:afterChange's two lists carries. */
|
|
8
|
+
export const ROLE_EVENT_ACTIONS_MAX = 200;
|
|
9
|
+
/** The most system:afterError events one instance raises a minute; the rest are counted into the next one's `suppressed`. */
|
|
10
|
+
export const SYSTEM_ERROR_EVENTS_PER_MINUTE = 30;
|
|
11
|
+
/** The longest error class name passed on; a longer or stranger name is passed as "Error". */
|
|
12
|
+
export const SYSTEM_ERROR_CLASS_MAX = 64;
|
|
13
|
+
/** The longest route pattern passed on in system:afterError; a longer one is cut. */
|
|
14
|
+
export const SYSTEM_ERROR_ROUTE_MAX = 200;
|
|
15
|
+
/** How long page views wait in memory before one site:afterPageViews event carries them. */
|
|
16
|
+
export const PAGE_VIEW_BATCH_MS = 10_000;
|
|
17
|
+
/** The most page and language pairs one site:afterPageViews event itemises; views past it add to `otherViews`. */
|
|
18
|
+
export const PAGE_VIEW_BATCH_PAGES_MAX = 500;
|
|
19
|
+
/** The most characters of a user agent the core reads to tell a likely bot; the agent itself is never passed on. */
|
|
20
|
+
export const USER_AGENT_SCAN_MAX = 512;
|
|
21
|
+
/** The most languages an address list in an event carries (previousAddresses, addresses). */
|
|
22
|
+
export const EVENT_ADDRESSES_MAX = 64;
|
|
23
|
+
/** Lower-case words whose presence in a user agent marks a likely bot. Matched with `includes`. */
|
|
24
|
+
export const LIKELY_BOT_MARKERS = ["bot", "crawl", "spider", "slurp", "curl", "wget", "python", "httpclient", "headless", "preview", "facebookexternalhit"];
|
|
25
|
+
function isClassChar(code) {
|
|
26
|
+
return (code >= 65 && code <= 90) || (code >= 97 && code <= 122) || (code >= 48 && code <= 57) || code === 95;
|
|
27
|
+
}
|
|
28
|
+
/** An error's class name when it is 1 to SYSTEM_ERROR_CLASS_MAX letters, digits or `_`; otherwise "Error". Never the message. */
|
|
29
|
+
export function errorClassOf(value) {
|
|
30
|
+
let name;
|
|
31
|
+
try {
|
|
32
|
+
name = value !== null && typeof value === "object" ? value.name : undefined;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return "Error";
|
|
36
|
+
}
|
|
37
|
+
if (typeof name !== "string" || name.length < 1 || name.length > SYSTEM_ERROR_CLASS_MAX)
|
|
38
|
+
return "Error";
|
|
39
|
+
for (let index = 0; index < name.length; index += 1)
|
|
40
|
+
if (!isClassChar(name.charCodeAt(index)))
|
|
41
|
+
return "Error";
|
|
42
|
+
return name;
|
|
43
|
+
}
|
|
44
|
+
/** Whether a request's user agent reads as a bot, a script or nothing at all. Reads at most USER_AGENT_SCAN_MAX characters. */
|
|
45
|
+
export function isLikelyBotAgent(userAgent) {
|
|
46
|
+
if (typeof userAgent !== "string" || userAgent.length === 0)
|
|
47
|
+
return true;
|
|
48
|
+
const scanned = userAgent.slice(0, USER_AGENT_SCAN_MAX).toLowerCase();
|
|
49
|
+
for (const marker of LIKELY_BOT_MARKERS)
|
|
50
|
+
if (scanned.includes(marker))
|
|
51
|
+
return true;
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { FieldDefinition } from "./document-type.schema.js";
|
|
2
|
+
import type { DataTypeTree } from "./nested-fields.schema.js";
|
|
3
|
+
/** What a field holds: its editor id, and for a Group or a list what is inside it (core part 5). */
|
|
4
|
+
export interface PluginFieldShape {
|
|
5
|
+
/** The editor id a plugin declares under `dataTypes`, never a data type row id. */
|
|
6
|
+
dataType: string;
|
|
7
|
+
/** A Group's sub-fields, in order; `shape` is null for a sub-type that is missing or cannot nest. */
|
|
8
|
+
group?: {
|
|
9
|
+
fields: Array<{
|
|
10
|
+
alias: string;
|
|
11
|
+
name: string;
|
|
12
|
+
shape: PluginFieldShape | null;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
/** A list's item type; null when the list names none or it is missing. */
|
|
16
|
+
list?: {
|
|
17
|
+
item: PluginFieldShape | null;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** One field of a page's document type: its id (the key in `data`), its name, and what it holds. */
|
|
21
|
+
export interface PluginFieldInfo extends PluginFieldShape {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* M33 K21 step 3: what a data type tree tells a plugin, by an allow-list copy: the editor id, and
|
|
27
|
+
* for a Group its sub-fields' aliases, names and shapes, for a list its item's shape. No settings,
|
|
28
|
+
* data type ids, bounds or requiredness at any level. Null for no tree or a data type that is gone.
|
|
29
|
+
* A top-level id no data type answers is a legacy field naming its editor (as every resolver reads
|
|
30
|
+
* it) unless it is a data type row id, whose row is gone.
|
|
31
|
+
*/
|
|
32
|
+
export declare function pluginFieldShape(tree: DataTypeTree | null | undefined): PluginFieldShape | null;
|
|
33
|
+
/**
|
|
34
|
+
* M33 K21: the one builder of a public read's `fields` (the published page reader, the page head
|
|
35
|
+
* and the serializer context): the type's fields in order, its private fields left out (month 32
|
|
36
|
+
* J7, as the read's `data` leaves them out), and a field whose data type is gone left out.
|
|
37
|
+
* `treeOf` answers a field's data type tree by its data type id.
|
|
38
|
+
*/
|
|
39
|
+
export declare function publicPluginFields(fields: readonly FieldDefinition[], treeOf: (dataTypeId: string) => DataTypeTree | null | undefined): PluginFieldInfo[];
|
|
40
|
+
/** A frozen copy of `fields`, every level frozen, so a plugin that writes to it changes nothing. */
|
|
41
|
+
export declare function frozenPluginFields(fields: readonly PluginFieldInfo[]): ReadonlyArray<Readonly<PluginFieldInfo>>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { UuidStringSchema } from "./uuid.schema.js";
|
|
2
|
+
/**
|
|
3
|
+
* M33 K21 step 3: what a data type tree tells a plugin, by an allow-list copy: the editor id, and
|
|
4
|
+
* for a Group its sub-fields' aliases, names and shapes, for a list its item's shape. No settings,
|
|
5
|
+
* data type ids, bounds or requiredness at any level. Null for no tree or a data type that is gone.
|
|
6
|
+
* A top-level id no data type answers is a legacy field naming its editor (as every resolver reads
|
|
7
|
+
* it) unless it is a data type row id, whose row is gone.
|
|
8
|
+
*/
|
|
9
|
+
export function pluginFieldShape(tree) {
|
|
10
|
+
if (!tree)
|
|
11
|
+
return null;
|
|
12
|
+
if (tree.missing === true)
|
|
13
|
+
return UuidStringSchema.safeParse(tree.dataTypeId).success ? null : { dataType: tree.editorId };
|
|
14
|
+
const shape = { dataType: tree.editorId };
|
|
15
|
+
if (tree.group) {
|
|
16
|
+
shape.group = { fields: tree.group.fields.map((field) => ({ alias: field.alias, name: field.name, shape: pluginFieldShape(field.type) })) };
|
|
17
|
+
}
|
|
18
|
+
if (tree.list)
|
|
19
|
+
shape.list = { item: pluginFieldShape(tree.list.item) };
|
|
20
|
+
return shape;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* M33 K21: the one builder of a public read's `fields` (the published page reader, the page head
|
|
24
|
+
* and the serializer context): the type's fields in order, its private fields left out (month 32
|
|
25
|
+
* J7, as the read's `data` leaves them out), and a field whose data type is gone left out.
|
|
26
|
+
* `treeOf` answers a field's data type tree by its data type id.
|
|
27
|
+
*/
|
|
28
|
+
export function publicPluginFields(fields, treeOf) {
|
|
29
|
+
const listed = [];
|
|
30
|
+
for (const field of fields) {
|
|
31
|
+
if (field.private === true)
|
|
32
|
+
continue;
|
|
33
|
+
const shape = pluginFieldShape(treeOf(field.datatypeId));
|
|
34
|
+
if (shape)
|
|
35
|
+
listed.push({ id: field.id, name: field.name, ...shape });
|
|
36
|
+
}
|
|
37
|
+
return listed;
|
|
38
|
+
}
|
|
39
|
+
/** A frozen copy of `fields`, every level frozen, so a plugin that writes to it changes nothing. */
|
|
40
|
+
export function frozenPluginFields(fields) {
|
|
41
|
+
// Plain JSON at every level (strings, null, arrays, objects), so a JSON copy is a whole copy.
|
|
42
|
+
const freeze = (value) => {
|
|
43
|
+
if (value !== null && typeof value === "object") {
|
|
44
|
+
for (const inner of Object.values(value))
|
|
45
|
+
freeze(inner);
|
|
46
|
+
Object.freeze(value);
|
|
47
|
+
}
|
|
48
|
+
return value;
|
|
49
|
+
};
|
|
50
|
+
return freeze(JSON.parse(JSON.stringify(fields)));
|
|
51
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** D12: the most GraphQL fields one plugin offers. */
|
|
2
|
+
export declare const PLUGIN_GRAPHQL_FIELDS_MAX = 10;
|
|
3
|
+
/** D14: the most arguments one field takes. */
|
|
4
|
+
export declare const PLUGIN_GRAPHQL_ARGUMENTS_MAX = 30;
|
|
5
|
+
/** D17: what one plugin field selection costs in the complexity rule (a core field costs 1). */
|
|
6
|
+
export declare const PLUGIN_GRAPHQL_FIELD_COST = 25;
|
|
7
|
+
/** D17: the most plugin field selections one operation makes, aliases counted. */
|
|
8
|
+
export declare const PLUGIN_GRAPHQL_FIELDS_PER_OPERATION = 10;
|
|
9
|
+
/** D17: how long a field waits for its route before it errors. */
|
|
10
|
+
export declare const PLUGIN_GRAPHQL_FIELD_TIMEOUT_MS = 10000;
|
|
11
|
+
/** D17: the largest route answer a field resolves to (1 MiB). */
|
|
12
|
+
export declare const PLUGIN_GRAPHQL_ANSWER_MAX_BYTES = 1048576;
|
|
13
|
+
/** D16: the longest route message a field's error carries. */
|
|
14
|
+
export declare const PLUGIN_GRAPHQL_MESSAGE_MAX = 200;
|
|
15
|
+
/** D15: the longest query string a field's arguments make; a longer call is refused before the route runs. */
|
|
16
|
+
export declare const PLUGIN_GRAPHQL_QUERY_MAX = 8192;
|
|
17
|
+
export interface PluginGraphqlFieldIssue {
|
|
18
|
+
path: (string | number)[];
|
|
19
|
+
message: string;
|
|
20
|
+
}
|
|
21
|
+
/** D12: the field's name on `Query`, the MCP tool's prefix, "_" and the field's own name. */
|
|
22
|
+
export declare function pluginGraphqlFieldName(pluginId: string, name: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* D12: every route marking `graphqlField` is an `apiKey` `GET` route with an action and no `:` or
|
|
25
|
+
* `*` parameter in its path; the field has a name of the tool alphabet used once in the plugin and
|
|
26
|
+
* a description of 1 to 500 characters, not blank and with no hidden character; `graphqlField` holds
|
|
27
|
+
* no other key; a plugin offers at most 10 fields.
|
|
28
|
+
*/
|
|
29
|
+
export declare function checkPluginGraphqlFields(manifest: {
|
|
30
|
+
id?: unknown;
|
|
31
|
+
contributions?: unknown;
|
|
32
|
+
}): PluginGraphqlFieldIssue[];
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { cleanPluginText, hasHiddenPluginCharacter } from "./plugin-cli-commands.js";
|
|
2
|
+
import { apiRoutePathParams } from "./plugin-manifest-api-routes.js";
|
|
3
|
+
import { PLUGIN_TOOL_DESCRIPTION_MAX, PLUGIN_TOOL_NAME_MAX, isPluginToolName, pluginToolShortName } from "./plugin-manifest-ai.js";
|
|
4
|
+
// M32 F3b (D12, D17): a plugin `apiRoutes` entry offered as a field on the delivery API's GraphQL
|
|
5
|
+
// `Query` type, and the limits such a field runs under. The SDK's manifest schema and the
|
|
6
|
+
// marketplace door, which reads manifest.json without the SDK's Zod, read this one rule. Every
|
|
7
|
+
// check is a length or a character scan, and a message names only values that passed their check.
|
|
8
|
+
/** D12: the most GraphQL fields one plugin offers. */
|
|
9
|
+
export const PLUGIN_GRAPHQL_FIELDS_MAX = 10;
|
|
10
|
+
/** D14: the most arguments one field takes. */
|
|
11
|
+
export const PLUGIN_GRAPHQL_ARGUMENTS_MAX = 30;
|
|
12
|
+
/** D17: what one plugin field selection costs in the complexity rule (a core field costs 1). */
|
|
13
|
+
export const PLUGIN_GRAPHQL_FIELD_COST = 25;
|
|
14
|
+
/** D17: the most plugin field selections one operation makes, aliases counted. */
|
|
15
|
+
export const PLUGIN_GRAPHQL_FIELDS_PER_OPERATION = 10;
|
|
16
|
+
/** D17: how long a field waits for its route before it errors. */
|
|
17
|
+
export const PLUGIN_GRAPHQL_FIELD_TIMEOUT_MS = 10_000;
|
|
18
|
+
/** D17: the largest route answer a field resolves to (1 MiB). */
|
|
19
|
+
export const PLUGIN_GRAPHQL_ANSWER_MAX_BYTES = 1_048_576;
|
|
20
|
+
/** D16: the longest route message a field's error carries. */
|
|
21
|
+
export const PLUGIN_GRAPHQL_MESSAGE_MAX = 200;
|
|
22
|
+
/** D15: the longest query string a field's arguments make; a longer call is refused before the route runs. */
|
|
23
|
+
export const PLUGIN_GRAPHQL_QUERY_MAX = 8192;
|
|
24
|
+
const FIELD_KEYS = new Set(["name", "description"]);
|
|
25
|
+
const isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
26
|
+
/** D12: the field's name on `Query`, the MCP tool's prefix, "_" and the field's own name. */
|
|
27
|
+
export function pluginGraphqlFieldName(pluginId, name) {
|
|
28
|
+
return `${pluginToolShortName(pluginId)}_${name}`;
|
|
29
|
+
}
|
|
30
|
+
function cleanKey(key) {
|
|
31
|
+
return cleanPluginText(key, 64);
|
|
32
|
+
}
|
|
33
|
+
function hasPathParameter(path) {
|
|
34
|
+
return path.includes("*") || apiRoutePathParams(path).length > 0;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* D12: every route marking `graphqlField` is an `apiKey` `GET` route with an action and no `:` or
|
|
38
|
+
* `*` parameter in its path; the field has a name of the tool alphabet used once in the plugin and
|
|
39
|
+
* a description of 1 to 500 characters, not blank and with no hidden character; `graphqlField` holds
|
|
40
|
+
* no other key; a plugin offers at most 10 fields.
|
|
41
|
+
*/
|
|
42
|
+
export function checkPluginGraphqlFields(manifest) {
|
|
43
|
+
const issues = [];
|
|
44
|
+
const contributions = isRecord(manifest.contributions) ? manifest.contributions : {};
|
|
45
|
+
const routes = Array.isArray(contributions.apiRoutes) ? contributions.apiRoutes : [];
|
|
46
|
+
const seen = new Map();
|
|
47
|
+
let fields = 0;
|
|
48
|
+
routes.forEach((route, index) => {
|
|
49
|
+
if (!isRecord(route) || route.graphqlField === undefined)
|
|
50
|
+
return;
|
|
51
|
+
const at = ["contributions", "apiRoutes", index, "graphqlField"];
|
|
52
|
+
fields++;
|
|
53
|
+
if (fields > PLUGIN_GRAPHQL_FIELDS_MAX) {
|
|
54
|
+
issues.push({ path: at, message: `a plugin offers at most ${PLUGIN_GRAPHQL_FIELDS_MAX} GraphQL fields` });
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (route.access !== "apiKey") {
|
|
58
|
+
issues.push({ path: at, message: `apiRoutes.${index} marks graphqlField, but only an "apiKey" route can be a GraphQL field: the delivery API is always called with a key` });
|
|
59
|
+
}
|
|
60
|
+
if (route.method !== "GET") {
|
|
61
|
+
issues.push({ path: at, message: `apiRoutes.${index} marks graphqlField, but only a "GET" route can be a GraphQL field: a field only reads` });
|
|
62
|
+
}
|
|
63
|
+
if (typeof route.action !== "string" || route.action === "") {
|
|
64
|
+
issues.push({ path: at, message: `apiRoutes.${index} marks graphqlField, but a GraphQL field's route must declare an action` });
|
|
65
|
+
}
|
|
66
|
+
if (typeof route.path === "string" && hasPathParameter(route.path)) {
|
|
67
|
+
issues.push({ path: at, message: `apiRoutes.${index} marks graphqlField, but its path has a ":" or "*" parameter: a field's arguments come from the query string only` });
|
|
68
|
+
}
|
|
69
|
+
const field = route.graphqlField;
|
|
70
|
+
if (!isRecord(field)) {
|
|
71
|
+
issues.push({ path: at, message: "graphqlField must be an object with a name and a description" });
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
for (const key of Object.keys(field)) {
|
|
75
|
+
if (!FIELD_KEYS.has(key))
|
|
76
|
+
issues.push({ path: [...at, cleanKey(key)], message: "graphqlField holds only name and description" });
|
|
77
|
+
}
|
|
78
|
+
const { name, description } = field;
|
|
79
|
+
if (typeof name !== "string" || !isPluginToolName(name)) {
|
|
80
|
+
issues.push({ path: [...at, "name"], message: `graphqlField.name must be 1 to ${PLUGIN_TOOL_NAME_MAX} lower-case letters, digits and "_", starting with a letter` });
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
const earlier = seen.get(name);
|
|
84
|
+
if (earlier !== undefined) {
|
|
85
|
+
issues.push({ path: [...at, "name"], message: `the GraphQL field name "${name}" is also apiRoutes.${earlier}'s: each field of a plugin needs its own name` });
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
seen.set(name, index);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (typeof description !== "string" ||
|
|
92
|
+
description.length > PLUGIN_TOOL_DESCRIPTION_MAX ||
|
|
93
|
+
description.trim().length === 0 ||
|
|
94
|
+
hasHiddenPluginCharacter(description)) {
|
|
95
|
+
issues.push({
|
|
96
|
+
path: [...at, "description"],
|
|
97
|
+
message: `graphqlField.description must be 1 to ${PLUGIN_TOOL_DESCRIPTION_MAX} characters, not blank, with no zero-width or direction character`,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
return issues;
|
|
102
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AuditActorKind } from "./audit-api.schema.js";
|
|
3
|
+
export declare const GUARD_POINTS: readonly ["content:beforeSave", "content:beforePublish", "content:beforeUnpublish", "content:beforeMove", "content:beforeTrash", "content:beforeRestore"];
|
|
4
|
+
export type GuardPoint = (typeof GUARD_POINTS)[number];
|
|
5
|
+
export declare const GUARD_OPERATIONS: readonly ["create", "save", "copy", "publish", "publishAll", "unpublish", "move", "trash", "restore"];
|
|
6
|
+
export type GuardOperation = (typeof GUARD_OPERATIONS)[number];
|
|
7
|
+
/** What a timeout, a throw or an answer out of shape means for the write. */
|
|
8
|
+
export declare const GUARD_FAILURE_MODES: readonly ["refuse", "allow"];
|
|
9
|
+
export type GuardFailureMode = (typeof GUARD_FAILURE_MODES)[number];
|
|
10
|
+
/** How long a write waits for its guards, all asked at once; at the limit each guard's signal is aborted. */
|
|
11
|
+
export declare const GUARD_TIME_MS = 2000;
|
|
12
|
+
export declare const GUARD_REFUSAL_CODE_MAX = 64;
|
|
13
|
+
export declare const GUARD_REFUSAL_MESSAGE_MAX = 300;
|
|
14
|
+
export declare const GUARD_MESSAGE_LANGUAGES_MAX = 20;
|
|
15
|
+
export declare const GUARD_DOCUMENT_TYPES_MAX = 20;
|
|
16
|
+
/** The refusal code the core writes when a guard failed and its declaration says refuse. */
|
|
17
|
+
export declare const GUARD_UNAVAILABLE_CODE = "guard_unavailable";
|
|
18
|
+
/** The error body's code for every guard refusal. */
|
|
19
|
+
export declare const PLUGIN_REFUSED_CODE = "plugin_refused";
|
|
20
|
+
/** A lower-case letter, then lower-case letters, digits and `_`, 1 to GUARD_REFUSAL_CODE_MAX. A scan, no pattern. */
|
|
21
|
+
export declare function isGuardRefusalCode(value: unknown): value is string;
|
|
22
|
+
/** Plain text, or a map of language code to text with English required. */
|
|
23
|
+
export declare const GuardMessageSchema: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
24
|
+
export declare const PluginGuardAnswerSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
25
|
+
allow: z.ZodLiteral<true>;
|
|
26
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
27
|
+
allow: z.ZodLiteral<false>;
|
|
28
|
+
code: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
29
|
+
message: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
30
|
+
}, z.core.$strict>]>;
|
|
31
|
+
export declare const PluginGuardDeclarationSchema: z.ZodObject<{
|
|
32
|
+
point: z.ZodEnum<{
|
|
33
|
+
"content:beforeSave": "content:beforeSave";
|
|
34
|
+
"content:beforePublish": "content:beforePublish";
|
|
35
|
+
"content:beforeUnpublish": "content:beforeUnpublish";
|
|
36
|
+
"content:beforeMove": "content:beforeMove";
|
|
37
|
+
"content:beforeTrash": "content:beforeTrash";
|
|
38
|
+
"content:beforeRestore": "content:beforeRestore";
|
|
39
|
+
}>;
|
|
40
|
+
documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
onFailure: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
allow: "allow";
|
|
43
|
+
refuse: "refuse";
|
|
44
|
+
}>>;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
export declare const PluginGuardDeclarationsSchema: z.ZodArray<z.ZodObject<{
|
|
47
|
+
point: z.ZodEnum<{
|
|
48
|
+
"content:beforeSave": "content:beforeSave";
|
|
49
|
+
"content:beforePublish": "content:beforePublish";
|
|
50
|
+
"content:beforeUnpublish": "content:beforeUnpublish";
|
|
51
|
+
"content:beforeMove": "content:beforeMove";
|
|
52
|
+
"content:beforeTrash": "content:beforeTrash";
|
|
53
|
+
"content:beforeRestore": "content:beforeRestore";
|
|
54
|
+
}>;
|
|
55
|
+
documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
|
+
onFailure: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
allow: "allow";
|
|
58
|
+
refuse: "refuse";
|
|
59
|
+
}>>;
|
|
60
|
+
}, z.core.$strict>>;
|
|
61
|
+
/** The rule over a manifest (live or manifest.json), as `path: message` issues. A live entry's
|
|
62
|
+
* `handler` is left out before the shape is read; that it is a function is the SDK schema's rule. */
|
|
63
|
+
export declare function checkGuardDeclarations(manifest: {
|
|
64
|
+
contributions?: unknown;
|
|
65
|
+
}): Array<{
|
|
66
|
+
path: (string | number)[];
|
|
67
|
+
message: string;
|
|
68
|
+
}>;
|
|
69
|
+
/** Who made the write a guard is asked about: the audit's actor kind, the user, key or plugin id, and a session's role. */
|
|
70
|
+
export interface GuardSubject {
|
|
71
|
+
kind: AuditActorKind;
|
|
72
|
+
id: string | null;
|
|
73
|
+
role: string | null;
|
|
74
|
+
}
|
|
75
|
+
export declare const PluginRefusalSchema: z.ZodObject<{
|
|
76
|
+
pluginId: z.ZodString;
|
|
77
|
+
pluginName: z.ZodString;
|
|
78
|
+
point: z.ZodEnum<{
|
|
79
|
+
"content:beforeSave": "content:beforeSave";
|
|
80
|
+
"content:beforePublish": "content:beforePublish";
|
|
81
|
+
"content:beforeUnpublish": "content:beforeUnpublish";
|
|
82
|
+
"content:beforeMove": "content:beforeMove";
|
|
83
|
+
"content:beforeTrash": "content:beforeTrash";
|
|
84
|
+
"content:beforeRestore": "content:beforeRestore";
|
|
85
|
+
}>;
|
|
86
|
+
code: z.ZodString;
|
|
87
|
+
message: z.ZodString;
|
|
88
|
+
messages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
89
|
+
failed: z.ZodBoolean;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export type PluginRefusal = z.infer<typeof PluginRefusalSchema>;
|
|
92
|
+
/** The 409 a refused write answers. */
|
|
93
|
+
export declare const PluginRefusalBodySchema: z.ZodObject<{
|
|
94
|
+
message: z.ZodString;
|
|
95
|
+
code: z.ZodLiteral<"plugin_refused">;
|
|
96
|
+
refusal: z.ZodObject<{
|
|
97
|
+
pluginId: z.ZodString;
|
|
98
|
+
pluginName: z.ZodString;
|
|
99
|
+
point: z.ZodEnum<{
|
|
100
|
+
"content:beforeSave": "content:beforeSave";
|
|
101
|
+
"content:beforePublish": "content:beforePublish";
|
|
102
|
+
"content:beforeUnpublish": "content:beforeUnpublish";
|
|
103
|
+
"content:beforeMove": "content:beforeMove";
|
|
104
|
+
"content:beforeTrash": "content:beforeTrash";
|
|
105
|
+
"content:beforeRestore": "content:beforeRestore";
|
|
106
|
+
}>;
|
|
107
|
+
code: z.ZodString;
|
|
108
|
+
message: z.ZodString;
|
|
109
|
+
messages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
110
|
+
failed: z.ZodBoolean;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
}, z.core.$strip>;
|