@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
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { ActionStringSchema } from "./action.schema.js";
|
|
3
|
+
import { PluginActionDeclarationSchema, PluginRoleOfferSchema } from "./plugin-actions.schema.js";
|
|
4
|
+
import { PLUGIN_ACTION_OFFER_TARGETS, actionOfferTicked } from "./plugin-manifest-actions.js";
|
|
3
5
|
import { SLOT_ID_MAX, SLOT_ID_REGEX } from "./plugin-id-rules.js";
|
|
4
6
|
import { LABEL_KEY_MAX_LENGTH, LABEL_MAX_LANGUAGES, PluginLabelSchema, labelMapSchema, labelTextSchema, pluginLabelMapSchema } from "./plugin-labels.js";
|
|
5
7
|
import { RoleIdSchema } from "./role.schema.js";
|
|
8
|
+
import { PLUGIN_SECRET_VALUE_MAX_BYTES, fitsUtf8 } from "./plugin-secrets.js";
|
|
9
|
+
import { PLUGIN_SETTINGS_FIELDS_MAX, PLUGIN_SETTING_TEXT_MAX, PluginSettingFieldSchema, declaredSettingsFieldsOf, isPluginSettingId, pluginSettingsValuesSchema, } from "./plugin-settings.js";
|
|
10
|
+
import { INSTALL_MAX_CONNECTION_ANSWERS, ServiceConnectionKeySchema } from "./plugin-service-connections.js";
|
|
11
|
+
import { ServiceSummarySchema, declaresServices, readServiceDeclarations, serviceSummaryOf } from "./plugin-service-declarations.js";
|
|
6
12
|
// S292 (2026-10-13-s292-what-the-wizard-may-ask-design.md): what a plugin's
|
|
7
13
|
// install asks, declared as plain data in the manifest's `install`, so the
|
|
8
14
|
// install screen, a script and the CLI can all ask it and answer it before
|
|
@@ -36,6 +42,8 @@ export const INSTALL_LABEL_KEY_MAX_LENGTH = LABEL_KEY_MAX_LENGTH;
|
|
|
36
42
|
export const INSTALL_MAX_OPTION_ANSWERS = INSTALL_MAX_STEPS * INSTALL_MAX_OPTIONS_PER_STEP;
|
|
37
43
|
/** The most offered roles one answers object may name. */
|
|
38
44
|
export const INSTALL_MAX_ROLE_ANSWERS = 64;
|
|
45
|
+
/** M33 K29: the most offered actions one answers object may accept (`grants`). */
|
|
46
|
+
export const INSTALL_MAX_GRANT_ANSWERS = 64;
|
|
39
47
|
export const INSTALL_OPTION_KINDS = ["boolean", "select", "multiSelect"];
|
|
40
48
|
/** Keys an answers object can never use for an option. "__proto__" already
|
|
41
49
|
* fails the id rule as an option id, and InstallAnswersSchema refuses it as
|
|
@@ -172,12 +180,43 @@ export const InstallAnswerValueSchema = z.union([
|
|
|
172
180
|
InstallIdSchema,
|
|
173
181
|
z.array(InstallIdSchema).max(INSTALL_MAX_CHOICES_PER_OPTION, { message: `a list answer names at most ${INSTALL_MAX_CHOICES_PER_OPTION} choices` }),
|
|
174
182
|
], { error: "an answer is true or false, a choice id, or a list of choice ids" });
|
|
183
|
+
/** M32 F4d (D5): the most bytes (UTF-8) a secret answered at install may hold: a secret's own bound. */
|
|
184
|
+
export const INSTALL_SECRET_ANSWER_MAX_BYTES = PLUGIN_SECRET_VALUE_MAX_BYTES;
|
|
185
|
+
const InstallSettingKeySchema = z.string().refine(isPluginSettingId, {
|
|
186
|
+
message: 'a settings key is a field id: a letter, then letters, digits and "_", at most 40',
|
|
187
|
+
});
|
|
188
|
+
/** A secret field's answer: the value, sent once, stored sealed, never shown again. */
|
|
189
|
+
export const InstallSecretAnswerSchema = z
|
|
190
|
+
.object({
|
|
191
|
+
secret: z
|
|
192
|
+
.string()
|
|
193
|
+
.min(1, { message: "a secret answer is not empty" })
|
|
194
|
+
.refine((value) => fitsUtf8(value, INSTALL_SECRET_ANSWER_MAX_BYTES), { message: `a secret answer is at most ${INSTALL_SECRET_ANSWER_MAX_BYTES} bytes` }),
|
|
195
|
+
})
|
|
196
|
+
.strict();
|
|
197
|
+
/** One settings field's answer: its value, or a secret field's `{ secret }`. The field's own rule
|
|
198
|
+
* runs in the resolver, against the declaration. */
|
|
199
|
+
export const InstallSettingAnswerSchema = z.union([z.string().max(PLUGIN_SETTING_TEXT_MAX), z.number().finite(), z.boolean(), z.null(), InstallSecretAnswerSchema], { error: "a settings answer is a value (text, a number, true or false, or null) or { secret }" });
|
|
175
200
|
/** The answers object every install path takes. Strict, so a misspelt key is
|
|
176
201
|
* refused rather than ignored; read by resolveInstallAnswers. */
|
|
177
202
|
export const InstallAnswersSchema = z
|
|
178
203
|
.object({
|
|
179
204
|
sampleContent: z.boolean().optional(),
|
|
180
205
|
roles: z.array(RoleIdSchema).max(INSTALL_MAX_ROLE_ANSWERS, { message: `an answers object names at most ${INSTALL_MAX_ROLE_ANSWERS} roles` }).optional(),
|
|
206
|
+
// M33 K29: the offered actions (`actions[].offerTo`) to give the roles that hold their target.
|
|
207
|
+
// A door refuses them unless the caller holds `roles.update`, and the install applies each only
|
|
208
|
+
// when the caller holds that action too; an offer not applied waits under Plugins, Installed.
|
|
209
|
+
grants: z
|
|
210
|
+
.array(ActionStringSchema)
|
|
211
|
+
.max(INSTALL_MAX_GRANT_ANSWERS, { message: `an answers object accepts at most ${INSTALL_MAX_GRANT_ANSWERS} action offers` })
|
|
212
|
+
.meta({ example: ["com.example.words.panel.view"] })
|
|
213
|
+
.optional(),
|
|
214
|
+
// M35 B1a (W16): the connections the person ticked (design 4.6). Absent, the install grants each
|
|
215
|
+
// line's default; given, it grants the required lines that need no tick and exactly the ones named.
|
|
216
|
+
connections: z
|
|
217
|
+
.array(ServiceConnectionKeySchema)
|
|
218
|
+
.max(INSTALL_MAX_CONNECTION_ANSWERS, { message: `an answers object names at most ${INSTALL_MAX_CONNECTION_ANSWERS} connections` })
|
|
219
|
+
.optional(),
|
|
181
220
|
options: z
|
|
182
221
|
.preprocess(refuseOwnProtoKey, z
|
|
183
222
|
.record(InstallAnswerKeySchema, InstallAnswerValueSchema, {
|
|
@@ -190,6 +229,17 @@ export const InstallAnswersSchema = z
|
|
|
190
229
|
message: `an answers object answers at most ${INSTALL_MAX_OPTION_ANSWERS} options`,
|
|
191
230
|
}))
|
|
192
231
|
.optional(),
|
|
232
|
+
// M32 F4d (D5): the ask-at-install settings fields, by field id. A secret field's answer is
|
|
233
|
+
// `{ secret: value }`: it goes to the secret store, never into the resolved record.
|
|
234
|
+
settings: z
|
|
235
|
+
.preprocess(refuseOwnProtoKey, z
|
|
236
|
+
.record(InstallSettingKeySchema, InstallSettingAnswerSchema, {
|
|
237
|
+
error: (issue) => (issue.code === "invalid_key" ? issue.issues.map((inner) => inner.message).join("; ") : undefined),
|
|
238
|
+
})
|
|
239
|
+
.refine((settings) => Object.keys(settings).length <= PLUGIN_SETTINGS_FIELDS_MAX, {
|
|
240
|
+
message: `an answers object answers at most ${PLUGIN_SETTINGS_FIELDS_MAX} settings`,
|
|
241
|
+
}))
|
|
242
|
+
.optional(),
|
|
193
243
|
})
|
|
194
244
|
.strict();
|
|
195
245
|
/** The answers with every default filled: what onInstall and onUpdate are
|
|
@@ -198,9 +248,106 @@ export const ResolvedInstallAnswersSchema = z
|
|
|
198
248
|
.object({
|
|
199
249
|
sampleContent: z.boolean(),
|
|
200
250
|
roles: z.array(RoleIdSchema),
|
|
251
|
+
/** M33 K29: the offered actions the install's answers accepted; absent when they named none.
|
|
252
|
+
* What was applied is the record's `offersApplied`: an accepted offer the caller could not
|
|
253
|
+
* give (it lacks the action) is here and waits. */
|
|
254
|
+
grants: z.array(ActionStringSchema).optional(),
|
|
201
255
|
options: z.record(InstallIdSchema, InstallAnswerValueSchema),
|
|
256
|
+
/** M32 F4d (D5): the non-secret settings answered at install; absent when none was. A secret
|
|
257
|
+
* answer is never here. */
|
|
258
|
+
settings: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), z.null()])).optional(),
|
|
202
259
|
})
|
|
203
260
|
.strict();
|
|
261
|
+
function readOwn(value, key) {
|
|
262
|
+
try {
|
|
263
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? value[key] : undefined;
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
return undefined;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* M32 F4d (D5): the settings fields a manifest's `contributions` declare with `askAtInstall: true`:
|
|
271
|
+
* `declaredSettingsFieldsOf` (the one list the Settings page draws) narrowed to those, so the install
|
|
272
|
+
* dialog never asks, nor stores a secret for, a field the Settings page leaves out.
|
|
273
|
+
*/
|
|
274
|
+
export function askedAtInstallFieldsOf(contributions) {
|
|
275
|
+
return declaredSettingsFieldsOf(contributions).filter((field) => field.askAtInstall === true);
|
|
276
|
+
}
|
|
277
|
+
function askedFieldsOf(manifest) {
|
|
278
|
+
return manifest.askedSettings ?? askedAtInstallFieldsOf(manifest.contributions);
|
|
279
|
+
}
|
|
280
|
+
function storedValueIds(stored) {
|
|
281
|
+
const inner = readOwn(stored, "values");
|
|
282
|
+
const values = inner !== null && typeof inner === "object" && !Array.isArray(inner) ? inner : stored;
|
|
283
|
+
if (values === null || typeof values !== "object" || Array.isArray(values))
|
|
284
|
+
return new Set();
|
|
285
|
+
return new Set(Object.keys(values));
|
|
286
|
+
}
|
|
287
|
+
/** M32 F4d (D5): the ask-at-install fields an update still asks: those with no stored value (for a
|
|
288
|
+
* secret field, its secret is not set). */
|
|
289
|
+
export function settingsNotStoredBy(fields, stored, secretsSet) {
|
|
290
|
+
const ids = storedValueIds(stored);
|
|
291
|
+
return fields.filter((field) => (field.type === "secret" ? !secretsSet.has(field.secret) : !ids.has(field.id)));
|
|
292
|
+
}
|
|
293
|
+
/** The settings answers checked against the ask-at-install fields: issues pushed in answer order,
|
|
294
|
+
* then the field rules'. A message never quotes a value. `stored`, on an update, refuses a field
|
|
295
|
+
* that already has a value. */
|
|
296
|
+
function resolveSettingsAnswers(asked, given, issues, stored) {
|
|
297
|
+
const values = {};
|
|
298
|
+
const secrets = [];
|
|
299
|
+
if (given === undefined)
|
|
300
|
+
return { values, secrets };
|
|
301
|
+
const byId = new Map(asked.map((field) => [field.id, field]));
|
|
302
|
+
const open = stored === undefined ? null : new Set(settingsNotStoredBy(asked, stored.values, stored.secretsSet).map((field) => field.id));
|
|
303
|
+
const plain = {};
|
|
304
|
+
for (const key of Object.keys(given)) {
|
|
305
|
+
const path = ["settings", key];
|
|
306
|
+
const id = JSON.stringify(key);
|
|
307
|
+
const field = byId.get(key);
|
|
308
|
+
const value = given[key];
|
|
309
|
+
if (field === undefined) {
|
|
310
|
+
issues.push({ path, message: `this plugin asks no setting ${id} at install` });
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
if (open !== null && !open.has(key)) {
|
|
314
|
+
issues.push({ path, message: `${id} already has a value, and an update keeps it: change it on the plugin's Settings page` });
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
const isSecret = value !== null && typeof value === "object";
|
|
318
|
+
if (field.type === "secret") {
|
|
319
|
+
if (isSecret)
|
|
320
|
+
secrets.push({ name: field.secret, value: value.secret });
|
|
321
|
+
else
|
|
322
|
+
issues.push({ path, message: `${id} is a secret: answer it as { "secret": "..." }` });
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
if (isSecret) {
|
|
326
|
+
issues.push({ path, message: `${id} is not a secret: answer its value` });
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
plain[key] = value;
|
|
330
|
+
}
|
|
331
|
+
const parsed = pluginSettingsValuesSchema(asked).safeParse(plain);
|
|
332
|
+
if (!parsed.success) {
|
|
333
|
+
for (const issue of parsed.error.issues) {
|
|
334
|
+
issues.push({ path: ["settings", ...issue.path.filter((part) => typeof part !== "symbol")], message: issue.message });
|
|
335
|
+
}
|
|
336
|
+
return { values, secrets };
|
|
337
|
+
}
|
|
338
|
+
for (const [key, value] of Object.entries(parsed.data))
|
|
339
|
+
if (value !== undefined)
|
|
340
|
+
values[key] = value;
|
|
341
|
+
return { values, secrets };
|
|
342
|
+
}
|
|
343
|
+
/** The ok result, its settings parts added only when there are any. */
|
|
344
|
+
function okResult(answers, settings) {
|
|
345
|
+
return {
|
|
346
|
+
ok: true,
|
|
347
|
+
answers: { ...answers, ...(Object.keys(settings.values).length > 0 ? { settings: settings.values } : {}) },
|
|
348
|
+
...(settings.secrets.length > 0 ? { secrets: settings.secrets } : {}),
|
|
349
|
+
};
|
|
350
|
+
}
|
|
204
351
|
/** One declared option's answer, or undefined with its issue pushed (or for an
|
|
205
352
|
* optional select left unanswered). `needsAnswer` words the refusal of an
|
|
206
353
|
* unanswered select that needs one, given the option's quoted id: an
|
|
@@ -287,6 +434,7 @@ export function resolveInstallAnswers(manifest, shipped, answers) {
|
|
|
287
434
|
else
|
|
288
435
|
roles.push(role);
|
|
289
436
|
});
|
|
437
|
+
const grants = resolveGrantAnswers(manifest, answers.grants, issues);
|
|
290
438
|
const declared = new Map();
|
|
291
439
|
for (const step of manifest.install?.steps ?? [])
|
|
292
440
|
for (const option of step.options)
|
|
@@ -302,7 +450,24 @@ export function resolveInstallAnswers(manifest, shipped, answers) {
|
|
|
302
450
|
if (value !== undefined)
|
|
303
451
|
options[id] = value;
|
|
304
452
|
}
|
|
305
|
-
|
|
453
|
+
const settings = resolveSettingsAnswers(askedFieldsOf(manifest), answers.settings, issues);
|
|
454
|
+
return issues.length > 0 ? { ok: false, issues } : okResult({ sampleContent, roles, options, ...(grants.length > 0 ? { grants } : {}) }, settings);
|
|
455
|
+
}
|
|
456
|
+
/** M33 K29: the offered actions `grants` names, in answer order, each one an action the manifest
|
|
457
|
+
* declares with `offerTo` and named once; every other is an issue. Who may give them is the
|
|
458
|
+
* door's and the install's to decide (roles.update and the action itself), not the answers'. */
|
|
459
|
+
function resolveGrantAnswers(manifest, given, issues) {
|
|
460
|
+
const offered = new Set((manifest.actions ?? []).filter((action) => action.offerTo !== undefined).map((action) => action.id));
|
|
461
|
+
const grants = [];
|
|
462
|
+
(given ?? []).forEach((action, index) => {
|
|
463
|
+
if (!offered.has(action))
|
|
464
|
+
issues.push({ path: ["grants", index], message: `this plugin offers no action ${JSON.stringify(action)} to a role` });
|
|
465
|
+
else if (grants.includes(action))
|
|
466
|
+
issues.push({ path: ["grants", index], message: `action ${JSON.stringify(action)} is answered more than once` });
|
|
467
|
+
else
|
|
468
|
+
grants.push(action);
|
|
469
|
+
});
|
|
470
|
+
return grants;
|
|
306
471
|
}
|
|
307
472
|
/** What a door reads from manifest.json (or the live manifest) to resolve
|
|
308
473
|
* answers. Not strict: a manifest's other keys are allowed and left out of
|
|
@@ -310,6 +475,8 @@ export function resolveInstallAnswers(manifest, shipped, answers) {
|
|
|
310
475
|
export const InstallAnswersManifestSchema = z.object({
|
|
311
476
|
install: PluginInstallDeclarationSchema.optional(),
|
|
312
477
|
roles: z.array(PluginRoleOfferSchema).optional(),
|
|
478
|
+
// M33 K29: the actions, for the ones a `grants` answer may name.
|
|
479
|
+
actions: z.array(PluginActionDeclarationSchema).optional(),
|
|
313
480
|
});
|
|
314
481
|
/** A manifest nothing has validated yet, read for its answers: the shape first,
|
|
315
482
|
* then checkInstallDeclaration on a declaration that parsed (S292 C7), because
|
|
@@ -326,7 +493,11 @@ export function parseInstallAnswersManifest(raw) {
|
|
|
326
493
|
};
|
|
327
494
|
}
|
|
328
495
|
const declarationIssues = parsed.data.install ? checkInstallDeclaration(parsed.data.install) : [];
|
|
329
|
-
|
|
496
|
+
if (declarationIssues.length > 0)
|
|
497
|
+
return { ok: false, issues: declarationIssues };
|
|
498
|
+
// M32 F4d (D5): the ask-at-install settings, read here once as copies; set only when there are any.
|
|
499
|
+
const askedSettings = askedAtInstallFieldsOf(readOwn(raw, "contributions"));
|
|
500
|
+
return { ok: true, manifest: askedSettings.length > 0 ? { ...parsed.data, askedSettings } : parsed.data };
|
|
330
501
|
}
|
|
331
502
|
function recordedValue(recorded, id) {
|
|
332
503
|
return recorded && Object.hasOwn(recorded.options, id) ? recorded.options[id] : undefined;
|
|
@@ -363,15 +534,29 @@ const updateNeedsAnswer = (id) => `${id} has no recorded answer and no default,
|
|
|
363
534
|
* and the declaration are held to what resolveInstallAnswers assumes;
|
|
364
535
|
* `recorded` is the row's record read through readInstallRecord, or null
|
|
365
536
|
* for a plugin installed before S293. */
|
|
366
|
-
|
|
537
|
+
// M32 F4d (D5): `answers.settings` on the record (and so in installRecord) is what the install and
|
|
538
|
+
// each update were answered for the ask-at-install fields, kept as asked. It is not the plugin's
|
|
539
|
+
// current settings: those live in the registry row's `settings` column, which the Settings page
|
|
540
|
+
// changes. `storedSettings` below, read from that column, is what decides which fields are still asked.
|
|
541
|
+
export function resolveUpdateAnswers(manifest, recorded, given,
|
|
542
|
+
/** M32 F4d (D5): what is already stored; an answer for a field that has a value is refused.
|
|
543
|
+
* Absent (a door's pre-check, which has not read it), nothing is taken as stored, and the
|
|
544
|
+
* registry, which reads the row, refuses it. */
|
|
545
|
+
storedSettings) {
|
|
367
546
|
const issues = [];
|
|
368
547
|
if (given.sampleContent !== undefined)
|
|
369
548
|
issues.push({ path: ["sampleContent"], message: "an update never adds sample content" });
|
|
370
549
|
if (given.roles !== undefined && given.roles.length > 0) {
|
|
371
550
|
issues.push({ path: ["roles"], message: "an update creates no roles: accept an offered role from the installed plugins list" });
|
|
372
551
|
}
|
|
552
|
+
// M33 K29: an update's new offer is shown under Plugins, Installed and never applied by the
|
|
553
|
+
// update itself, so an update's answers accept none. The install's grants stay on the record.
|
|
554
|
+
if (given.grants !== undefined && given.grants.length > 0) {
|
|
555
|
+
issues.push({ path: ["grants"], message: "an update applies no action offer: apply it from the installed plugins list" });
|
|
556
|
+
}
|
|
373
557
|
const offered = new Set((manifest.roles ?? []).map((role) => role.id));
|
|
374
558
|
const roles = (recorded?.roles ?? []).filter((role) => offered.has(role));
|
|
559
|
+
const grants = recorded?.grants;
|
|
375
560
|
const declared = new Map();
|
|
376
561
|
for (const step of manifest.install?.steps ?? [])
|
|
377
562
|
for (const option of step.options)
|
|
@@ -396,7 +581,12 @@ export function resolveUpdateAnswers(manifest, recorded, given) {
|
|
|
396
581
|
if (value !== undefined)
|
|
397
582
|
options[id] = value;
|
|
398
583
|
}
|
|
399
|
-
|
|
584
|
+
const settings = resolveSettingsAnswers(askedFieldsOf(manifest), given.settings, issues, storedSettings);
|
|
585
|
+
// The settings answered at install stay on the record beside this update's.
|
|
586
|
+
const merged = { values: { ...(recorded?.settings ?? {}), ...settings.values }, secrets: settings.secrets };
|
|
587
|
+
return issues.length > 0
|
|
588
|
+
? { ok: false, issues }
|
|
589
|
+
: okResult({ sampleContent: recorded?.sampleContent ?? false, roles, options, ...(grants !== undefined ? { grants: [...grants] } : {}) }, merged);
|
|
400
590
|
}
|
|
401
591
|
/** What installing does whatever the answers, in the order the install
|
|
402
592
|
* applies it, structured storage last (it is what an uninstall must
|
|
@@ -420,6 +610,8 @@ const InstallConsentDetailSchema = z.union([InstallConsentTextSchema, InstallCon
|
|
|
420
610
|
const consentItemShape = { id: z.string(), details: z.array(InstallConsentDetailSchema) };
|
|
421
611
|
const sampleContentShape = { default: z.literal(true), description: InstallDescriptionSchema.optional() };
|
|
422
612
|
const roleOfferShape = { id: z.string(), label: PluginLabelSchema, actions: z.array(z.string()), default: z.literal(false) };
|
|
613
|
+
// M33 K29: an action offered to the roles that hold `target`; `default` is derived (actionOfferTicked).
|
|
614
|
+
const actionOfferShape = { action: z.string().meta({ example: "com.example.words.panel.view" }), label: PluginLabelSchema, target: z.enum(PLUGIN_ACTION_OFFER_TARGETS), default: z.boolean() };
|
|
423
615
|
/** The install interface: what a screen shows and a script answers, before
|
|
424
616
|
* anything is installed. The marketplace stores it per version and its
|
|
425
617
|
* listing API carries it to the admin. A consent id is an open string on
|
|
@@ -432,7 +624,13 @@ export const InstallInterfaceSchema = z
|
|
|
432
624
|
consent: z.array(z.object(consentItemShape).strict()),
|
|
433
625
|
sampleContent: z.object(sampleContentShape).strict().nullable(),
|
|
434
626
|
roles: z.array(z.object(roleOfferShape).strict()),
|
|
627
|
+
/** M33 K29: the actions offered to the roles holding a core action; absent when none is. */
|
|
628
|
+
offers: z.array(z.object(actionOfferShape).strict()).optional(),
|
|
435
629
|
steps: z.array(InstallStepSchema),
|
|
630
|
+
/** M32 F4d (D5): the settings fields asked at install, as declared; absent when there are none. */
|
|
631
|
+
settings: z.array(PluginSettingFieldSchema).optional(),
|
|
632
|
+
/** M35 B1a: what the plugin offers, uses, raises and hears; absent when it declares none. */
|
|
633
|
+
services: ServiceSummarySchema.optional(),
|
|
436
634
|
})
|
|
437
635
|
.strict();
|
|
438
636
|
/** InstallInterfaceSchema as the listing wire carries it, from the
|
|
@@ -443,12 +641,20 @@ export const InstallInterfaceSchema = z
|
|
|
443
641
|
* keys are dropped on the interface, its consent items, its sample content
|
|
444
642
|
* and its roles; the steps stay on the closed InstallStepSchema (D15),
|
|
445
643
|
* because a step an older SDK cannot read belongs to a plugin that CMS
|
|
446
|
-
* refuses at install anyway.
|
|
644
|
+
* refuses at install anyway. An offer's `target` stays a closed enum for
|
|
645
|
+
* the same reason (M33 K29): a target an older CMS does not know comes from
|
|
646
|
+
* an `offerTo` its manifest check refuses, so that plugin cannot be
|
|
647
|
+
* installed there either way. Adding a target is therefore a change that
|
|
648
|
+
* ships with the CMS that reads it. */
|
|
447
649
|
export const InstallInterfaceWireSchema = z.object({
|
|
448
650
|
consent: z.array(z.object(consentItemShape)),
|
|
449
651
|
sampleContent: z.object(sampleContentShape).nullable(),
|
|
450
652
|
roles: z.array(z.object(roleOfferShape)),
|
|
653
|
+
offers: z.array(z.object(actionOfferShape)).optional(),
|
|
451
654
|
steps: z.array(InstallStepSchema),
|
|
655
|
+
settings: z.array(PluginSettingFieldSchema).optional(),
|
|
656
|
+
/** M35 B1a: what the plugin offers, uses, raises and hears; absent when it declares none. */
|
|
657
|
+
services: ServiceSummarySchema.optional(),
|
|
452
658
|
});
|
|
453
659
|
function asRecord(value) {
|
|
454
660
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
@@ -490,14 +696,22 @@ export function installInterfaceFor(manifest, shipped) {
|
|
|
490
696
|
].filter((item) => item !== null);
|
|
491
697
|
if (asRecord(manifest.databaseCompatibility)?.storageType === "structured")
|
|
492
698
|
consent.push({ id: "structuredStorage", details: [] });
|
|
699
|
+
const asked = askedAtInstallFieldsOf(manifest.contributions);
|
|
700
|
+
const offers = (manifest.actions ?? []).flatMap(({ id, label, offerTo }) => offerTo === undefined ? [] : [{ action: id, label, target: offerTo, default: actionOfferTicked(manifest.contributions, id) }]);
|
|
701
|
+
// M35 B1a: the services part, read as the server reads it, so the screen and the install agree.
|
|
702
|
+
const services = readServiceDeclarations(manifest);
|
|
493
703
|
return {
|
|
494
704
|
consent,
|
|
495
705
|
sampleContent: shipped.sampleContent
|
|
496
706
|
? { default: true, ...(shipped.sampleContentDescription ? { description: shipped.sampleContentDescription } : {}) }
|
|
497
707
|
: null,
|
|
498
708
|
roles: (manifest.roles ?? []).map(({ id, label, actions }) => ({ id, label, actions: [...actions], default: false })),
|
|
709
|
+
...(offers.length > 0 ? { offers } : {}),
|
|
499
710
|
// A JSON round trip: the declaration is plain data, and the caller may
|
|
500
711
|
// change what it is handed without touching the manifest.
|
|
501
712
|
steps: manifest.install ? JSON.parse(JSON.stringify(manifest.install.steps)) : [],
|
|
713
|
+
// M32 F4d (D5): parsed copies, so the caller may change what it is handed.
|
|
714
|
+
...(asked.length > 0 ? { settings: asked } : {}),
|
|
715
|
+
...(declaresServices(services) ? { services: serviceSummaryOf(services) } : {}),
|
|
502
716
|
};
|
|
503
717
|
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const KEEP_PREVIEW_PAGE_SIZE = 50;
|
|
3
|
+
/** Sample pages an install may record is already bounded by SAMPLE_CONTENT_MAX_BYTES; the explicit list sent with an uninstall is capped here. */
|
|
4
|
+
export declare const UNINSTALL_SAMPLE_PAGES_MAX = 500;
|
|
5
|
+
/** The keep plan reads every document type of the site, a page of 100 at a time, to find the types
|
|
6
|
+
* whose default is one of the plugin's templates; past this many it stops and keeps everything. */
|
|
7
|
+
export declare const UNINSTALL_DOCUMENT_TYPES_SCANNED_MAX = 5000;
|
|
8
|
+
export declare const KeptPartStateSchema: z.ZodEnum<{
|
|
9
|
+
on: "on";
|
|
10
|
+
uninstalled: "uninstalled";
|
|
11
|
+
off: "off";
|
|
12
|
+
}>;
|
|
13
|
+
export type KeptPartState = z.infer<typeof KeptPartStateSchema>;
|
|
14
|
+
export declare const KeptTemplateReasonSchema: z.ZodEnum<{
|
|
15
|
+
used: "used";
|
|
16
|
+
edited: "edited";
|
|
17
|
+
referenced: "referenced";
|
|
18
|
+
}>;
|
|
19
|
+
export type KeptTemplateReason = z.infer<typeof KeptTemplateReasonSchema>;
|
|
20
|
+
/** How far a delete or a preview counts a type's trashed pages; past it the answer says "at least". */
|
|
21
|
+
export declare const DOCUMENT_TYPE_TRASHED_COUNT_LIMIT = 1000;
|
|
22
|
+
/** GET /api/manage/v1/plugins/:pluginId/uninstall-preview: what an uninstall keeps and what goes, a
|
|
23
|
+
* part at a time, a pure read that never runs plugin code. */
|
|
24
|
+
export declare const UNINSTALL_PREVIEW_PARTS: readonly ["summary", "samplePages", "documentTypes", "templates"];
|
|
25
|
+
export declare const UninstallPreviewQuerySchema: z.ZodObject<{
|
|
26
|
+
part: z.ZodEnum<{
|
|
27
|
+
summary: "summary";
|
|
28
|
+
documentTypes: "documentTypes";
|
|
29
|
+
templates: "templates";
|
|
30
|
+
samplePages: "samplePages";
|
|
31
|
+
}>;
|
|
32
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type UninstallPreviewQuery = z.infer<typeof UninstallPreviewQuerySchema>;
|
|
35
|
+
export declare const UninstallPreviewSchema: z.ZodObject<{
|
|
36
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
pageCount: z.ZodNumber;
|
|
38
|
+
documentTypesKept: z.ZodNumber;
|
|
39
|
+
templatesKept: z.ZodNumber;
|
|
40
|
+
templatesLeaving: z.ZodNumber;
|
|
41
|
+
assetsKept: z.ZodBoolean;
|
|
42
|
+
dataSnapshotted: z.ZodBoolean;
|
|
43
|
+
scanStopped: z.ZodBoolean;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
samplePages: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
items: z.ZodArray<z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
title: z.ZodString;
|
|
49
|
+
path: z.ZodString;
|
|
50
|
+
edited: z.ZodBoolean;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
documentTypes: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
items: z.ZodArray<z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
name: z.ZodString;
|
|
58
|
+
livePages: z.ZodNumber;
|
|
59
|
+
trashedPages: z.ZodNumber;
|
|
60
|
+
trashedCapped: z.ZodBoolean;
|
|
61
|
+
stays: z.ZodBoolean;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
templates: z.ZodOptional<z.ZodObject<{
|
|
66
|
+
items: z.ZodArray<z.ZodObject<{
|
|
67
|
+
id: z.ZodString;
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
kind: z.ZodString;
|
|
70
|
+
stays: z.ZodBoolean;
|
|
71
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
72
|
+
used: "used";
|
|
73
|
+
edited: "edited";
|
|
74
|
+
referenced: "referenced";
|
|
75
|
+
}>>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
export type UninstallPreview = z.infer<typeof UninstallPreviewSchema>;
|
|
81
|
+
/** GET /api/manage/v1/plugins/:pluginId/switch-off-preview: what a switch-off stops, and the
|
|
82
|
+
* published pages whose template loses a dynamic part (a tag or filter of the plugin writes
|
|
83
|
+
* nothing while it is off). Pages keep displaying; nothing is deleted. */
|
|
84
|
+
export declare const SwitchOffPreviewQuerySchema: z.ZodObject<{
|
|
85
|
+
part: z.ZodEnum<{
|
|
86
|
+
pages: "pages";
|
|
87
|
+
summary: "summary";
|
|
88
|
+
}>;
|
|
89
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export type SwitchOffPreviewQuery = z.infer<typeof SwitchOffPreviewQuerySchema>;
|
|
92
|
+
export declare const SwitchOffPreviewSchema: z.ZodObject<{
|
|
93
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
stops: z.ZodObject<{
|
|
95
|
+
adminScreens: z.ZodNumber;
|
|
96
|
+
apiRoutes: z.ZodNumber;
|
|
97
|
+
siteRoutes: z.ZodNumber;
|
|
98
|
+
scheduledTasks: z.ZodNumber;
|
|
99
|
+
hooks: z.ZodNumber;
|
|
100
|
+
templateTagsAndFilters: z.ZodNumber;
|
|
101
|
+
fieldEditors: z.ZodNumber;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
refusal: z.ZodNullable<z.ZodObject<{
|
|
104
|
+
code: z.ZodString;
|
|
105
|
+
message: z.ZodString;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
templatesWithDynamicParts: z.ZodArray<z.ZodObject<{
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
name: z.ZodString;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
templatesNotListed: z.ZodNumber;
|
|
112
|
+
scanStopped: z.ZodBoolean;
|
|
113
|
+
}, z.core.$strip>>;
|
|
114
|
+
pages: z.ZodOptional<z.ZodObject<{
|
|
115
|
+
items: z.ZodArray<z.ZodObject<{
|
|
116
|
+
id: z.ZodString;
|
|
117
|
+
title: z.ZodString;
|
|
118
|
+
path: z.ZodString;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
export type SwitchOffPreview = z.infer<typeof SwitchOffPreviewSchema>;
|
|
124
|
+
/** M35: a page of a switched-off plugin's document type cannot be created (409); existing pages stay editable. */
|
|
125
|
+
export declare const DOCUMENT_TYPE_SWITCHED_OFF_CODE = "document_type_switched_off";
|
|
126
|
+
/** M35: the refusal's body, the same from the admin's create and copy and the delivery API's create. */
|
|
127
|
+
export declare const DocumentTypeSwitchedOffSchema: z.ZodObject<{
|
|
128
|
+
code: z.ZodLiteral<"document_type_switched_off">;
|
|
129
|
+
message: z.ZodString;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
export declare const DOCUMENT_TYPE_SWITCHED_OFF_MESSAGE = "The plugin that provides this document type is switched off, so no new page of it can be created. Switch the plugin on, or choose another type.";
|
|
132
|
+
/** M35 (final fix wave): a bundle member a bundle install has installed and not yet decided is not
|
|
133
|
+
* installed or updated through any other door until the bundle commits or rolls back (409). */
|
|
134
|
+
export declare const BUNDLE_INSTALL_IN_PROGRESS_CODE = "bundle_install_in_progress";
|
|
135
|
+
export declare const BundleInstallInProgressSchema: z.ZodObject<{
|
|
136
|
+
code: z.ZodLiteral<"bundle_install_in_progress">;
|
|
137
|
+
message: z.ZodString;
|
|
138
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { UNINSTALL_TEMPLATES_LISTED_MAX } from "./plugin-install-record.schema.js";
|
|
3
|
+
// M35 (operator bug 14, 2026-11-22): switching a plugin off and uninstalling it never destroy
|
|
4
|
+
// content. An uninstall keeps every page, the document types and data types pages use, the
|
|
5
|
+
// templates pages use with their assets, and every template the site owner edited; those parts
|
|
6
|
+
// carry a kept mark. These are the bounds and the shapes the keep plan, the previews and the marks
|
|
7
|
+
// share.
|
|
8
|
+
export const KEEP_PREVIEW_PAGE_SIZE = 50;
|
|
9
|
+
/** Sample pages an install may record is already bounded by SAMPLE_CONTENT_MAX_BYTES; the explicit list sent with an uninstall is capped here. */
|
|
10
|
+
export const UNINSTALL_SAMPLE_PAGES_MAX = 500;
|
|
11
|
+
/** The keep plan reads every document type of the site, a page of 100 at a time, to find the types
|
|
12
|
+
* whose default is one of the plugin's templates; past this many it stops and keeps everything. */
|
|
13
|
+
export const UNINSTALL_DOCUMENT_TYPES_SCANNED_MAX = 5000;
|
|
14
|
+
// The switch-off preview's template scan reuses UNINSTALL_TEMPLATES_SCANNED_MAX and
|
|
15
|
+
// UNINSTALL_TEMPLATES_LISTED_MAX (plugin-install-record.schema.ts) through templatesUsingNames; no
|
|
16
|
+
// new cap.
|
|
17
|
+
export const KeptPartStateSchema = z.enum(["on", "off", "uninstalled"]);
|
|
18
|
+
export const KeptTemplateReasonSchema = z.enum(["used", "edited", "referenced"]);
|
|
19
|
+
/** How far a delete or a preview counts a type's trashed pages; past it the answer says "at least". */
|
|
20
|
+
export const DOCUMENT_TYPE_TRASHED_COUNT_LIMIT = 1000;
|
|
21
|
+
/** GET /api/manage/v1/plugins/:pluginId/uninstall-preview: what an uninstall keeps and what goes, a
|
|
22
|
+
* part at a time, a pure read that never runs plugin code. */
|
|
23
|
+
export const UNINSTALL_PREVIEW_PARTS = ["summary", "samplePages", "documentTypes", "templates"];
|
|
24
|
+
export const UninstallPreviewQuerySchema = z.object({
|
|
25
|
+
part: z.enum(UNINSTALL_PREVIEW_PARTS),
|
|
26
|
+
cursor: z.string().max(200).optional(),
|
|
27
|
+
});
|
|
28
|
+
export const UninstallPreviewSchema = z.object({
|
|
29
|
+
summary: z
|
|
30
|
+
.object({
|
|
31
|
+
pageCount: z.number().int().nonnegative(),
|
|
32
|
+
documentTypesKept: z.number(),
|
|
33
|
+
templatesKept: z.number(),
|
|
34
|
+
templatesLeaving: z.number(),
|
|
35
|
+
assetsKept: z.boolean(),
|
|
36
|
+
dataSnapshotted: z.boolean(),
|
|
37
|
+
scanStopped: z.boolean(),
|
|
38
|
+
})
|
|
39
|
+
.optional(),
|
|
40
|
+
samplePages: z
|
|
41
|
+
.object({
|
|
42
|
+
items: z.array(z.object({ id: z.string(), title: z.string(), path: z.string(), edited: z.boolean() })).max(KEEP_PREVIEW_PAGE_SIZE),
|
|
43
|
+
nextCursor: z.string().nullable(),
|
|
44
|
+
})
|
|
45
|
+
.optional(),
|
|
46
|
+
documentTypes: z
|
|
47
|
+
.object({
|
|
48
|
+
items: z
|
|
49
|
+
.array(z.object({
|
|
50
|
+
id: z.string(),
|
|
51
|
+
name: z.string(),
|
|
52
|
+
livePages: z.number().int().nonnegative(),
|
|
53
|
+
trashedPages: z.number().int().nonnegative(),
|
|
54
|
+
trashedCapped: z.boolean(),
|
|
55
|
+
stays: z.boolean(),
|
|
56
|
+
}))
|
|
57
|
+
.max(KEEP_PREVIEW_PAGE_SIZE),
|
|
58
|
+
nextCursor: z.string().nullable(),
|
|
59
|
+
})
|
|
60
|
+
.optional(),
|
|
61
|
+
templates: z
|
|
62
|
+
.object({
|
|
63
|
+
items: z
|
|
64
|
+
.array(z.object({ id: z.string(), name: z.string(), kind: z.string(), stays: z.boolean(), reason: KeptTemplateReasonSchema.nullable() }))
|
|
65
|
+
.max(KEEP_PREVIEW_PAGE_SIZE),
|
|
66
|
+
nextCursor: z.string().nullable(),
|
|
67
|
+
})
|
|
68
|
+
.optional(),
|
|
69
|
+
});
|
|
70
|
+
/** GET /api/manage/v1/plugins/:pluginId/switch-off-preview: what a switch-off stops, and the
|
|
71
|
+
* published pages whose template loses a dynamic part (a tag or filter of the plugin writes
|
|
72
|
+
* nothing while it is off). Pages keep displaying; nothing is deleted. */
|
|
73
|
+
export const SwitchOffPreviewQuerySchema = z.object({
|
|
74
|
+
part: z.enum(["summary", "pages"]),
|
|
75
|
+
cursor: z.string().max(200).optional(),
|
|
76
|
+
});
|
|
77
|
+
export const SwitchOffPreviewSchema = z.object({
|
|
78
|
+
summary: z
|
|
79
|
+
.object({
|
|
80
|
+
stops: z.object({
|
|
81
|
+
adminScreens: z.number(),
|
|
82
|
+
apiRoutes: z.number(),
|
|
83
|
+
siteRoutes: z.number(),
|
|
84
|
+
scheduledTasks: z.number(),
|
|
85
|
+
hooks: z.number(),
|
|
86
|
+
templateTagsAndFilters: z.number(),
|
|
87
|
+
fieldEditors: z.number(),
|
|
88
|
+
}),
|
|
89
|
+
refusal: z.object({ code: z.string(), message: z.string() }).nullable(),
|
|
90
|
+
templatesWithDynamicParts: z.array(z.object({ id: z.string(), name: z.string() })).max(UNINSTALL_TEMPLATES_LISTED_MAX),
|
|
91
|
+
templatesNotListed: z.number(),
|
|
92
|
+
scanStopped: z.boolean(),
|
|
93
|
+
})
|
|
94
|
+
.optional(),
|
|
95
|
+
pages: z
|
|
96
|
+
.object({
|
|
97
|
+
items: z.array(z.object({ id: z.string(), title: z.string(), path: z.string() })).max(KEEP_PREVIEW_PAGE_SIZE),
|
|
98
|
+
nextCursor: z.string().nullable(),
|
|
99
|
+
})
|
|
100
|
+
.optional(),
|
|
101
|
+
});
|
|
102
|
+
/** M35: a page of a switched-off plugin's document type cannot be created (409); existing pages stay editable. */
|
|
103
|
+
export const DOCUMENT_TYPE_SWITCHED_OFF_CODE = "document_type_switched_off";
|
|
104
|
+
/** M35: the refusal's body, the same from the admin's create and copy and the delivery API's create. */
|
|
105
|
+
export const DocumentTypeSwitchedOffSchema = z.object({ code: z.literal(DOCUMENT_TYPE_SWITCHED_OFF_CODE), message: z.string() });
|
|
106
|
+
export const DOCUMENT_TYPE_SWITCHED_OFF_MESSAGE = "The plugin that provides this document type is switched off, so no new page of it can be created. Switch the plugin on, or choose another type.";
|
|
107
|
+
/** M35 (final fix wave): a bundle member a bundle install has installed and not yet decided is not
|
|
108
|
+
* installed or updated through any other door until the bundle commits or rolls back (409). */
|
|
109
|
+
export const BUNDLE_INSTALL_IN_PROGRESS_CODE = "bundle_install_in_progress";
|
|
110
|
+
export const BundleInstallInProgressSchema = z.object({ code: z.literal(BUNDLE_INSTALL_IN_PROGRESS_CODE), message: z.string() });
|
|
@@ -51,10 +51,36 @@ export declare function pluginLabelMapSchema(): z.ZodPreprocess<z.ZodObject<{
|
|
|
51
51
|
export declare const PluginLabelMapSchema: z.ZodPreprocess<z.ZodObject<{
|
|
52
52
|
en: z.ZodString;
|
|
53
53
|
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
54
|
+
/** A label neither branch accepts is explained once: a map that carries its
|
|
55
|
+
* English text by the map's own first problem (too many languages, a key that
|
|
56
|
+
* is not a language code, a text that is not one), anything else by what a
|
|
57
|
+
* label is. */
|
|
58
|
+
export declare function labelUnionError(issue: {
|
|
59
|
+
code?: string;
|
|
60
|
+
input?: unknown;
|
|
61
|
+
errors?: ReadonlyArray<ReadonlyArray<{
|
|
62
|
+
path: PropertyKey[];
|
|
63
|
+
message: string;
|
|
64
|
+
}>>;
|
|
65
|
+
}): string | undefined;
|
|
54
66
|
export declare const PluginLabelSchema: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
55
67
|
en: z.ZodString;
|
|
56
68
|
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
69
|
+
/** Evidence 91: a description (a plugin setting field's, a plugin secret's), at most 240 characters in
|
|
70
|
+
* each language: twice a label's PLUGIN_LABEL_MAX, room for what a value needs and what it costs
|
|
71
|
+
* beside the input. One number for both, so a secret's text is never held shorter than a setting's. */
|
|
72
|
+
export declare const PLUGIN_SETTING_DESCRIPTION_MAX = 240;
|
|
73
|
+
/** A description: a string or a language map with English, trimmed, each text at most
|
|
74
|
+
* PLUGIN_SETTING_DESCRIPTION_MAX characters (a label's rule at a longer cap). A fresh instance each
|
|
75
|
+
* call, because the OpenAPI conversion drops a schema instance that a new union reuses. */
|
|
76
|
+
export declare function pluginDescriptionSchema(): z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
77
|
+
en: z.ZodString;
|
|
78
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
57
79
|
/** The text of a label for a language: the language as given, else its primary
|
|
58
80
|
* subtag (`de-AT` reads `de`), else `en`, which every map carries. Codes
|
|
59
81
|
* compare case-insensitively (BCP 47 tags do). A plain string is its own text. */
|
|
60
82
|
export declare function resolveLabel(label: PluginLabel, language: string): string;
|
|
83
|
+
/** The language a label's text is in when read for a language, as resolveLabel picks it: the
|
|
84
|
+
* map's code it read (as written there), `en` when it fell back, and null for a plain string,
|
|
85
|
+
* whose language is not known. */
|
|
86
|
+
export declare function resolvedLabelLanguage(label: PluginLabel, language: string): string | null;
|