@kardalum/plugin-sdk 0.20.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 +70 -0
- package/dist/admin-section-registry.d.ts +33 -1
- package/dist/admin-section-registry.js +67 -0
- package/dist/capabilities.js +46 -1
- package/dist/consent-entry.d.ts +11 -0
- package/dist/consent-entry.js +18 -0
- package/dist/content-library.d.ts +17 -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 +2 -0
- package/dist/content-picker/page-picker-sheet.js +1 -1
- package/dist/content-picker/page-picker.d.ts +18 -0
- package/dist/content-picker/page-picker.js +20 -0
- package/dist/datatype-validation.js +10 -2
- package/dist/datatypes-entry.d.ts +1 -0
- package/dist/datatypes-entry.js +2 -0
- package/dist/entitlement-types.d.ts +18 -1
- package/dist/host-entry.d.ts +7 -1
- package/dist/host-entry.js +14 -1
- package/dist/index.d.ts +35 -7
- package/dist/index.js +46 -5
- package/dist/mail.d.ts +6 -2
- package/dist/manifest-entry.d.ts +22 -4
- package/dist/manifest-entry.js +25 -1
- package/dist/manifest-schema.d.ts +570 -31
- package/dist/manifest-schema.js +240 -12
- package/dist/manifest.d.ts +757 -32
- package/dist/manifest.js +8 -4
- package/dist/plugin-context.d.ts +47 -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 +152 -11
- package/dist/plugin-screen-context.js +30 -0
- package/dist/providers.d.ts +47 -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 +27 -21
- 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 +38 -18
- 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/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 +59 -0
- package/dist/sdk-strings.js +64 -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/structured-storage-types.d.ts +124 -4
- 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 -1
- package/dist/text-entry.js +3 -2
- package/dist/tokens/system-dark.css +1 -0
- package/dist/tokens/tailwind-theme.css +2 -0
- package/dist/tokens/tokens.css +4 -0
- package/dist/tokens/tokens.json +5 -1
- 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/content-list-view.js +207 -8
- package/dist/views/content-picker-view.js +1 -1
- package/dist/views/rich-text-view.d.ts +2 -0
- package/dist/views/rich-text-view.js +182 -24
- 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 +127 -8
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +82 -7
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +2 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +11 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +18 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +80 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +41 -2
- 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/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 +50 -13
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +19 -10
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +37 -0
- 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/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 +52 -14
- package/node_modules/@kardalum/api-schemas/dist/index.js +53 -9
- 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/mail-rules.d.ts +4 -2
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +6 -1
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +178 -2
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +51 -2
- 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/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-content-access.d.ts +4 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +12 -2
- 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-docs-api.schema.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +5 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +10 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +48 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +5 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +6 -4
- 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-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 +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +67 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +15 -0
- 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-management-api.schema.d.ts +80 -15
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +67 -23
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +10 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +33 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +2 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +7 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +43 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +36 -5
- 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-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 +10 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +10 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +171 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +406 -42
- 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-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-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/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 +303 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
- 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 +66 -1
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +465 -7
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +15 -118
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +110 -0
- 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 +9 -2
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +7 -2
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +19 -0
- 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 +5 -3
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +3 -1
- 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/structured-fields.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +28 -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/user-api.schema.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +2 -0
- 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 +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +9 -1
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +4 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +6 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +5 -1
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +4 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +9 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +276 -19
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +23 -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/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.js +21 -8
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +23 -10
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +30 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +6 -2
- 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/providers.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +24 -6
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +15 -0
- 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 +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +14 -4
- 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.js +44 -11
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +7 -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 +4 -0
- package/node_modules/@kardalum/plugin-package/dist/index.js +5 -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/textarea.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
- package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/index.js +2 -0
- package/package.json +15 -3
|
@@ -256,6 +256,11 @@ export declare const InstallAnswersSchema: z.ZodObject<{
|
|
|
256
256
|
sampleContent: z.ZodOptional<z.ZodBoolean>;
|
|
257
257
|
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
258
258
|
grants: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
260
|
+
consumer: z.ZodString;
|
|
261
|
+
provider: z.ZodString;
|
|
262
|
+
contract: z.ZodString;
|
|
263
|
+
}, z.core.$strict>>>;
|
|
259
264
|
options: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>>, unknown>>;
|
|
260
265
|
settings: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
261
266
|
secret: z.ZodString;
|
|
@@ -566,6 +571,7 @@ export declare const InstallInterfaceSchema: z.ZodObject<{
|
|
|
566
571
|
default: z.ZodOptional<z.ZodString>;
|
|
567
572
|
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
568
573
|
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
574
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
569
575
|
id: z.ZodString;
|
|
570
576
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
571
577
|
en: z.ZodString;
|
|
@@ -580,6 +586,7 @@ export declare const InstallInterfaceSchema: z.ZodObject<{
|
|
|
580
586
|
min: z.ZodOptional<z.ZodNumber>;
|
|
581
587
|
max: z.ZodOptional<z.ZodNumber>;
|
|
582
588
|
integer: z.ZodOptional<z.ZodBoolean>;
|
|
589
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
583
590
|
id: z.ZodString;
|
|
584
591
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
585
592
|
en: z.ZodString;
|
|
@@ -591,6 +598,7 @@ export declare const InstallInterfaceSchema: z.ZodObject<{
|
|
|
591
598
|
}, z.core.$strict>, z.ZodObject<{
|
|
592
599
|
type: z.ZodLiteral<"onOff">;
|
|
593
600
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
601
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
594
602
|
id: z.ZodString;
|
|
595
603
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
596
604
|
en: z.ZodString;
|
|
@@ -608,6 +616,7 @@ export declare const InstallInterfaceSchema: z.ZodObject<{
|
|
|
608
616
|
en: z.ZodString;
|
|
609
617
|
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
610
618
|
}, z.core.$strict>>;
|
|
619
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
611
620
|
id: z.ZodString;
|
|
612
621
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
613
622
|
en: z.ZodString;
|
|
@@ -628,6 +637,32 @@ export declare const InstallInterfaceSchema: z.ZodObject<{
|
|
|
628
637
|
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
629
638
|
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
630
639
|
}, z.core.$strict>], "type">>>;
|
|
640
|
+
services: z.ZodOptional<z.ZodObject<{
|
|
641
|
+
contracts: z.ZodArray<z.ZodObject<{
|
|
642
|
+
name: z.ZodString;
|
|
643
|
+
version: z.ZodString;
|
|
644
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
645
|
+
readsPersonal: z.ZodBoolean;
|
|
646
|
+
personalOutput: z.ZodArray<z.ZodString>;
|
|
647
|
+
sendsPersonal: z.ZodBoolean;
|
|
648
|
+
writes: z.ZodBoolean;
|
|
649
|
+
}, z.core.$strip>>;
|
|
650
|
+
offers: z.ZodArray<z.ZodObject<{
|
|
651
|
+
contract: z.ZodString;
|
|
652
|
+
version: z.ZodString;
|
|
653
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
654
|
+
}, z.core.$strip>>;
|
|
655
|
+
uses: z.ZodArray<z.ZodObject<{
|
|
656
|
+
contract: z.ZodString;
|
|
657
|
+
range: z.ZodString;
|
|
658
|
+
optional: z.ZodBoolean;
|
|
659
|
+
}, z.core.$strip>>;
|
|
660
|
+
events: z.ZodArray<z.ZodObject<{
|
|
661
|
+
name: z.ZodString;
|
|
662
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
663
|
+
}, z.core.$strip>>;
|
|
664
|
+
listens: z.ZodArray<z.ZodString>;
|
|
665
|
+
}, z.core.$strip>>;
|
|
631
666
|
}, z.core.$strict>;
|
|
632
667
|
export type InstallInterface = z.infer<typeof InstallInterfaceSchema>;
|
|
633
668
|
/** InstallInterfaceSchema as the listing wire carries it, from the
|
|
@@ -741,6 +776,7 @@ export declare const InstallInterfaceWireSchema: z.ZodObject<{
|
|
|
741
776
|
default: z.ZodOptional<z.ZodString>;
|
|
742
777
|
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
743
778
|
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
779
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
744
780
|
id: z.ZodString;
|
|
745
781
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
746
782
|
en: z.ZodString;
|
|
@@ -755,6 +791,7 @@ export declare const InstallInterfaceWireSchema: z.ZodObject<{
|
|
|
755
791
|
min: z.ZodOptional<z.ZodNumber>;
|
|
756
792
|
max: z.ZodOptional<z.ZodNumber>;
|
|
757
793
|
integer: z.ZodOptional<z.ZodBoolean>;
|
|
794
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
758
795
|
id: z.ZodString;
|
|
759
796
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
760
797
|
en: z.ZodString;
|
|
@@ -766,6 +803,7 @@ export declare const InstallInterfaceWireSchema: z.ZodObject<{
|
|
|
766
803
|
}, z.core.$strict>, z.ZodObject<{
|
|
767
804
|
type: z.ZodLiteral<"onOff">;
|
|
768
805
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
806
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
769
807
|
id: z.ZodString;
|
|
770
808
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
771
809
|
en: z.ZodString;
|
|
@@ -783,6 +821,7 @@ export declare const InstallInterfaceWireSchema: z.ZodObject<{
|
|
|
783
821
|
en: z.ZodString;
|
|
784
822
|
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
785
823
|
}, z.core.$strict>>;
|
|
824
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
786
825
|
id: z.ZodString;
|
|
787
826
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
788
827
|
en: z.ZodString;
|
|
@@ -803,12 +842,40 @@ export declare const InstallInterfaceWireSchema: z.ZodObject<{
|
|
|
803
842
|
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
804
843
|
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
805
844
|
}, z.core.$strict>], "type">>>;
|
|
845
|
+
services: z.ZodOptional<z.ZodObject<{
|
|
846
|
+
contracts: z.ZodArray<z.ZodObject<{
|
|
847
|
+
name: z.ZodString;
|
|
848
|
+
version: z.ZodString;
|
|
849
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
850
|
+
readsPersonal: z.ZodBoolean;
|
|
851
|
+
personalOutput: z.ZodArray<z.ZodString>;
|
|
852
|
+
sendsPersonal: z.ZodBoolean;
|
|
853
|
+
writes: z.ZodBoolean;
|
|
854
|
+
}, z.core.$strip>>;
|
|
855
|
+
offers: z.ZodArray<z.ZodObject<{
|
|
856
|
+
contract: z.ZodString;
|
|
857
|
+
version: z.ZodString;
|
|
858
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
859
|
+
}, z.core.$strip>>;
|
|
860
|
+
uses: z.ZodArray<z.ZodObject<{
|
|
861
|
+
contract: z.ZodString;
|
|
862
|
+
range: z.ZodString;
|
|
863
|
+
optional: z.ZodBoolean;
|
|
864
|
+
}, z.core.$strip>>;
|
|
865
|
+
events: z.ZodArray<z.ZodObject<{
|
|
866
|
+
name: z.ZodString;
|
|
867
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
868
|
+
}, z.core.$strip>>;
|
|
869
|
+
listens: z.ZodArray<z.ZodString>;
|
|
870
|
+
}, z.core.$strip>>;
|
|
806
871
|
}, z.core.$strip>;
|
|
807
872
|
export type InstallInterfaceWire = z.infer<typeof InstallInterfaceWireSchema>;
|
|
808
873
|
/** What installInterfaceFor reads: the live manifest or manifest.json's
|
|
809
874
|
* redacted form (where migrations are ids). The consent facts are read
|
|
810
875
|
* defensively, as deriveCapabilities reads them. */
|
|
811
876
|
export interface InstallInterfaceManifest {
|
|
877
|
+
/** M35 B1a: read for the services summary (readServiceDeclarations). */
|
|
878
|
+
id?: string;
|
|
812
879
|
install?: PluginInstallDeclaration;
|
|
813
880
|
roles?: ReadonlyArray<{
|
|
814
881
|
id: string;
|
|
@@ -7,6 +7,8 @@ import { LABEL_KEY_MAX_LENGTH, LABEL_MAX_LANGUAGES, PluginLabelSchema, labelMapS
|
|
|
7
7
|
import { RoleIdSchema } from "./role.schema.js";
|
|
8
8
|
import { PLUGIN_SECRET_VALUE_MAX_BYTES, fitsUtf8 } from "./plugin-secrets.js";
|
|
9
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";
|
|
10
12
|
// S292 (2026-10-13-s292-what-the-wizard-may-ask-design.md): what a plugin's
|
|
11
13
|
// install asks, declared as plain data in the manifest's `install`, so the
|
|
12
14
|
// install screen, a script and the CLI can all ask it and answer it before
|
|
@@ -209,6 +211,12 @@ export const InstallAnswersSchema = z
|
|
|
209
211
|
.max(INSTALL_MAX_GRANT_ANSWERS, { message: `an answers object accepts at most ${INSTALL_MAX_GRANT_ANSWERS} action offers` })
|
|
210
212
|
.meta({ example: ["com.example.words.panel.view"] })
|
|
211
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(),
|
|
212
220
|
options: z
|
|
213
221
|
.preprocess(refuseOwnProtoKey, z
|
|
214
222
|
.record(InstallAnswerKeySchema, InstallAnswerValueSchema, {
|
|
@@ -621,6 +629,8 @@ export const InstallInterfaceSchema = z
|
|
|
621
629
|
steps: z.array(InstallStepSchema),
|
|
622
630
|
/** M32 F4d (D5): the settings fields asked at install, as declared; absent when there are none. */
|
|
623
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(),
|
|
624
634
|
})
|
|
625
635
|
.strict();
|
|
626
636
|
/** InstallInterfaceSchema as the listing wire carries it, from the
|
|
@@ -643,6 +653,8 @@ export const InstallInterfaceWireSchema = z.object({
|
|
|
643
653
|
offers: z.array(z.object(actionOfferShape)).optional(),
|
|
644
654
|
steps: z.array(InstallStepSchema),
|
|
645
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(),
|
|
646
658
|
});
|
|
647
659
|
function asRecord(value) {
|
|
648
660
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
@@ -686,6 +698,8 @@ export function installInterfaceFor(manifest, shipped) {
|
|
|
686
698
|
consent.push({ id: "structuredStorage", details: [] });
|
|
687
699
|
const asked = askedAtInstallFieldsOf(manifest.contributions);
|
|
688
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);
|
|
689
703
|
return {
|
|
690
704
|
consent,
|
|
691
705
|
sampleContent: shipped.sampleContent
|
|
@@ -698,5 +712,6 @@ export function installInterfaceFor(manifest, shipped) {
|
|
|
698
712
|
steps: manifest.install ? JSON.parse(JSON.stringify(manifest.install.steps)) : [],
|
|
699
713
|
// M32 F4d (D5): parsed copies, so the caller may change what it is handed.
|
|
700
714
|
...(asked.length > 0 ? { settings: asked } : {}),
|
|
715
|
+
...(declaresServices(services) ? { services: serviceSummaryOf(services) } : {}),
|
|
701
716
|
};
|
|
702
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() });
|