@kardalum/plugin-sdk 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +253 -0
- package/README.md +20 -1
- package/dist/admin-section-registry.d.ts +16 -1
- package/dist/admin-section-registry.js +23 -0
- package/dist/assets/asset-picker.js +3 -3
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-serializers.js +1 -1
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +90 -4
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +48 -17
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +55 -3
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +22 -0
- package/dist/content-library.d.ts +85 -0
- package/dist/content-library.js +15 -0
- package/dist/content-picker/page-picker-sheet.d.ts +13 -0
- package/dist/content-picker/page-picker-sheet.js +105 -0
- package/dist/content-picker/page-tree.d.ts +25 -0
- package/dist/content-picker/page-tree.js +132 -0
- package/dist/data-type-plugin.d.ts +9 -3
- package/dist/datatype-validation.d.ts +6 -11
- package/dist/datatype-validation.js +141 -3
- package/dist/define-plugin.d.ts +4 -4
- package/dist/define-plugin.js +5 -5
- package/dist/entitlement-entry.d.ts +1 -1
- package/dist/entitlement-entry.js +1 -1
- package/dist/entitlement-gate.d.ts +14 -0
- package/dist/entitlement-gate.js +64 -7
- package/dist/entitlement-plan.d.ts +6 -0
- package/dist/entitlement-plan.js +10 -0
- package/dist/entitlement-types.d.ts +36 -12
- package/dist/entitlement.d.ts +31 -4
- package/dist/entitlement.js +58 -17
- package/dist/hook-entry.d.ts +5 -0
- package/dist/hook-entry.js +30 -0
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +1 -1
- package/dist/index.d.ts +38 -4
- package/dist/index.js +54 -3
- package/dist/mail.d.ts +30 -0
- package/dist/mail.js +1 -0
- package/dist/manifest-entry.d.ts +29 -4
- package/dist/manifest-entry.js +39 -2
- package/dist/manifest-schema.d.ts +443 -29
- package/dist/manifest-schema.js +292 -24
- package/dist/manifest.d.ts +450 -51
- package/dist/manifest.js +1 -1
- package/dist/media/media-picker.js +33 -20
- package/dist/media/upload-error.d.ts +5 -1
- package/dist/media/upload-error.js +14 -2
- package/dist/media-library.d.ts +32 -0
- package/dist/media-library.js +15 -0
- package/dist/nested-field-host.d.ts +76 -0
- package/dist/nested-field-host.js +90 -0
- package/dist/notify.d.ts +12 -4
- package/dist/notify.js +1 -1
- package/dist/outbound.d.ts +47 -0
- package/dist/outbound.js +1 -0
- package/dist/plugin-context.d.ts +5 -0
- package/dist/plugin-context.js +3 -3
- package/dist/plugin-screen-context.d.ts +112 -0
- package/dist/plugin-screen-context.js +26 -0
- package/dist/providers.d.ts +268 -0
- package/dist/providers.js +74 -0
- package/dist/read-all-pages.d.ts +5 -0
- package/dist/read-all-pages.js +3 -2
- package/dist/register-built-ins.js +6 -6
- package/dist/registry.js +1 -1
- package/dist/richtext/block-panel.js +12 -7
- package/dist/richtext/extensions.js +7 -7
- package/dist/richtext/insert-menu.js +12 -9
- package/dist/richtext/style-listbox.js +7 -5
- package/dist/richtext/text-style-class.js +1 -1
- package/dist/sdk-strings.d.ts +285 -0
- package/dist/sdk-strings.js +347 -0
- package/dist/sealing.d.ts +14 -0
- package/dist/sealing.js +1 -0
- package/dist/simple-storage-value-provider.js +27 -27
- package/dist/structured-storage-types.d.ts +309 -9
- package/dist/structured-storage-types.js +2 -2
- package/dist/text-entry.d.ts +1 -0
- package/dist/text-entry.js +6 -0
- package/dist/tokens/tailwind-theme.css +5 -0
- package/dist/tokens/tokens.css +15 -3
- package/dist/tokens/tokens.json +8 -3
- package/dist/ui-entry.js +3 -3
- package/dist/views/asset-view.js +6 -3
- package/dist/views/content-list-preview.js +3 -1
- package/dist/views/content-list-settings-view.js +11 -7
- package/dist/views/content-list-view.d.ts +5 -3
- package/dist/views/content-list-view.js +38 -34
- package/dist/views/content-picker-view.d.ts +3 -0
- package/dist/views/content-picker-view.js +143 -0
- package/dist/views/crop-view.d.ts +4 -6
- package/dist/views/crop-view.js +22 -13
- package/dist/views/date-range-view.js +9 -6
- package/dist/views/file-upload-view.d.ts +5 -7
- package/dist/views/file-upload-view.js +16 -7
- package/dist/views/group-view.d.ts +8 -0
- package/dist/views/group-view.js +123 -0
- package/dist/views/html-code-editor.js +2 -2
- package/dist/views/html-view.js +12 -11
- package/dist/views/image-view.js +40 -22
- package/dist/views/link-view.d.ts +3 -0
- package/dist/views/link-view.js +150 -0
- package/dist/views/options-list-view.d.ts +3 -0
- package/dist/views/options-list-view.js +104 -0
- package/dist/views/repeatable-list-view.d.ts +3 -0
- package/dist/views/repeatable-list-view.js +113 -0
- package/dist/views/rich-text-view.js +32 -16
- package/dist/views/suggest-key.d.ts +17 -0
- package/dist/views/suggest-key.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +215 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +179 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +7 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/auth.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +126 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +116 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +71 -18
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +57 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +137 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +3 -3
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +10 -5
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +7 -4
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +9 -1
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +4 -4
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +267 -12
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +54 -8
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +98 -13
- package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +122 -43
- package/node_modules/@kardalum/api-schemas/dist/index.js +92 -27
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
- package/node_modules/@kardalum/api-schemas/dist/listing-categories.schema.d.ts +46 -0
- package/node_modules/@kardalum/api-schemas/dist/listing-categories.schema.js +52 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +224 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +404 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +359 -8
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +85 -11
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +22 -10
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +9 -5
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +53 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +284 -0
- package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
- package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +42 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +74 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.js +1 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +13 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +38 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +237 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +205 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +357 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +279 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +16 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +34 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +22 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +31 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +310 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +430 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +342 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +400 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +180 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +612 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +50 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +4 -4
- package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +82 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +497 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +91 -1
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +289 -0
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +205 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +121 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +51 -10
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +384 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +616 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +160 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +58 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +35 -4
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
- package/node_modules/@kardalum/api-schemas/package.json +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +8 -2
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +5 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +3 -3
- package/node_modules/@kardalum/design-tokens/dist/theme-css.d.ts +2 -2
- package/node_modules/@kardalum/design-tokens/dist/theme-css.js +2 -2
- package/node_modules/@kardalum/design-tokens/dist/theme-types.d.ts +2 -2
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.d.ts +3 -3
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.js +3 -3
- package/node_modules/@kardalum/design-tokens/dist/themes/light.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/themes/light.js +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +15 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +4 -4
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +17 -8
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +8 -3
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +2 -2
- package/node_modules/@kardalum/design-tokens/dist/types.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +21 -2
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +8 -2
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +355 -22
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +2 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +34 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +47 -5
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +95 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +298 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +27 -5
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +140 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +10 -0
- package/node_modules/@kardalum/plugin-package/dist/envelope.d.ts +2 -2
- package/node_modules/@kardalum/plugin-package/dist/envelope.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +3 -3
- package/node_modules/@kardalum/plugin-package/dist/extract.js +9 -9
- package/node_modules/@kardalum/plugin-package/dist/hash.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/hash.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
- package/node_modules/@kardalum/plugin-package/dist/package-contract.d.ts +2 -2
- package/node_modules/@kardalum/plugin-package/dist/package-contract.js +5 -5
- package/node_modules/@kardalum/plugin-package/dist/types.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.js +8 -3
- package/node_modules/@kardalum/ui/dist/components/badge.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/button.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/dialog.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/dialog.js +49 -4
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.d.ts +5 -1
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +18 -5
- package/node_modules/@kardalum/ui/dist/components/empty-state.d.ts +4 -4
- package/node_modules/@kardalum/ui/dist/components/input.js +6 -1
- package/node_modules/@kardalum/ui/dist/components/property-field.js +3 -3
- package/node_modules/@kardalum/ui/dist/components/sheet.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/sheet.js +12 -7
- package/node_modules/@kardalum/ui/dist/components/skeleton.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/tab-strip.d.ts +3 -3
- package/node_modules/@kardalum/ui/dist/components/toast.js +4 -3
- package/node_modules/@kardalum/ui/dist/components/tooltip.d.ts +27 -0
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +81 -0
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +16 -0
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +95 -0
- package/node_modules/@kardalum/ui/dist/components/use-toast.js +2 -2
- package/node_modules/@kardalum/ui/dist/index.d.ts +3 -1
- package/node_modules/@kardalum/ui/dist/index.js +3 -1
- package/node_modules/@kardalum/ui/dist/lib/menu-host.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/lib/menu-host.js +17 -0
- package/node_modules/@kardalum/ui/package.json +8 -6
- package/package.json +18 -7
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { strictUrl } from "./strict-url.js";
|
|
3
|
+
import { AiConnectionIdleDaysSchema } from "./ai-connections.schema.js";
|
|
4
|
+
import { FORM_PROTECTION_MAX_PER_WINDOW, FORM_PROTECTION_MIN_SECONDS, FORM_PROTECTION_WINDOW_SECONDS } from "./form-protection.js";
|
|
5
|
+
import { CORE_PROVIDER_KEY, ProviderChoiceSchema } from "./plugin-providers.js";
|
|
6
|
+
// S358 (S236 spec): the operational settings an administrator may change without a
|
|
7
|
+
// restart. The list is closed on purpose (S236 spec section 8: never a general env
|
|
8
|
+
// editor); a key outside it is refused by the strict request schema.
|
|
9
|
+
/** The most a stored media ceiling may be (S358 P6). Uploads are held in memory. */
|
|
10
|
+
export const MEDIA_MAX_SIZE_CEILING_BYTES = 1_073_741_824;
|
|
11
|
+
// S358b spec D2: the most a stored text asset or template limit may be. A text asset is held in
|
|
12
|
+
// memory and in one database row on every dialect; a template is parsed on every render.
|
|
13
|
+
export const MAX_ASSET_BYTES_CEILING = 33_554_432;
|
|
14
|
+
export const MAX_TEMPLATE_BYTES_CEILING = 8_388_608;
|
|
15
|
+
/** The longest licence grace period, in days: a paid plugin's own check refuses a verdict older
|
|
16
|
+
* than this, so a longer period could never hold (S284b). */
|
|
17
|
+
export const LICENSE_GRACE_DAYS_MAX = 14;
|
|
18
|
+
// S359 (S359 spec D1, D8): the rate limits an administrator may change without a restart.
|
|
19
|
+
// Login, setup and the session lane are not here on purpose (D2, D4).
|
|
20
|
+
export const RATE_LIMIT_SETTING_KEYS = [
|
|
21
|
+
"rateLimitKeyMax",
|
|
22
|
+
"rateLimitIpMax",
|
|
23
|
+
"rateLimitWindowSeconds",
|
|
24
|
+
"rateLimitDocsMax",
|
|
25
|
+
"rateLimitDocsWindowSeconds",
|
|
26
|
+
"rateLimitMediaMax",
|
|
27
|
+
"rateLimitMediaWindowSeconds",
|
|
28
|
+
"rateLimitRenderMax",
|
|
29
|
+
"rateLimitRenderWindowSeconds",
|
|
30
|
+
"rateLimitAdminMax",
|
|
31
|
+
"rateLimitAdminWindowSeconds",
|
|
32
|
+
];
|
|
33
|
+
export function isRateLimitSettingKey(key) {
|
|
34
|
+
return RATE_LIMIT_SETTING_KEYS.includes(key);
|
|
35
|
+
}
|
|
36
|
+
export const RATE_LIMIT_MAX_CEILING = 1_000_000;
|
|
37
|
+
export const RATE_LIMIT_WINDOW_CEILING_SECONDS = 3600;
|
|
38
|
+
/** S359 spec D8: the administrator's own path runs through these two lanes. */
|
|
39
|
+
export const RATE_LIMIT_FLOORS_PER_MINUTE = { ip: 30, admin: 120 };
|
|
40
|
+
/** The smallest maximum that keeps `floorPerMinute` over a window of `windowSeconds`. It floors
|
|
41
|
+
* the burst as well as the rate (S359 fix wave): a window under a minute still allows the
|
|
42
|
+
* per-minute floor in one window, because a cold admin load is many requests in under a second. */
|
|
43
|
+
export function rateLimitFloorMax(floorPerMinute, windowSeconds) {
|
|
44
|
+
return Math.max(floorPerMinute, Math.ceil((floorPerMinute * windowSeconds) / 60));
|
|
45
|
+
}
|
|
46
|
+
const RateLimitMaxSchema = z.number().int().min(1).max(RATE_LIMIT_MAX_CEILING);
|
|
47
|
+
const RateLimitWindowSchema = z.number().int().min(1).max(RATE_LIMIT_WINDOW_CEILING_SECONDS);
|
|
48
|
+
// M32 F4 (D3, D17): which provider serves each kind, and the built-in form protection's limits.
|
|
49
|
+
// All six are session only: a choice decides what code receives every published page, every
|
|
50
|
+
// upload or every form send, and the limits throttle the site's own forms, so a key never sets them.
|
|
51
|
+
export const PROVIDER_SETTING_KEYS = [
|
|
52
|
+
"formProtectionProvider",
|
|
53
|
+
"searchProvider",
|
|
54
|
+
"mediaStore",
|
|
55
|
+
"mailSender",
|
|
56
|
+
"formProtectionMinSeconds",
|
|
57
|
+
"formProtectionSendsPerWindow",
|
|
58
|
+
"formProtectionWindowSeconds",
|
|
59
|
+
];
|
|
60
|
+
export function isProviderSettingKey(key) {
|
|
61
|
+
return PROVIDER_SETTING_KEYS.includes(key);
|
|
62
|
+
}
|
|
63
|
+
/** D3, D17: each key's default: the built-in provider, and the constants F's protection fixed. */
|
|
64
|
+
export const PROVIDER_SETTING_DEFAULTS = Object.freeze({
|
|
65
|
+
formProtectionProvider: CORE_PROVIDER_KEY,
|
|
66
|
+
searchProvider: CORE_PROVIDER_KEY,
|
|
67
|
+
mediaStore: CORE_PROVIDER_KEY,
|
|
68
|
+
mailSender: CORE_PROVIDER_KEY,
|
|
69
|
+
formProtectionMinSeconds: FORM_PROTECTION_MIN_SECONDS,
|
|
70
|
+
formProtectionSendsPerWindow: FORM_PROTECTION_MAX_PER_WINDOW,
|
|
71
|
+
formProtectionWindowSeconds: FORM_PROTECTION_WINDOW_SECONDS,
|
|
72
|
+
});
|
|
73
|
+
export const LIVE_SERVER_SETTING_KEYS = [
|
|
74
|
+
"previewTokenTtl",
|
|
75
|
+
"previewBaseUrl",
|
|
76
|
+
"publicUrl",
|
|
77
|
+
"mediaMaxSize",
|
|
78
|
+
"licenseCheckIntervalHours",
|
|
79
|
+
"licenseStaleWarnDays",
|
|
80
|
+
"maxAssetBytes",
|
|
81
|
+
"maxTemplateBytes",
|
|
82
|
+
"licenseGraceDays",
|
|
83
|
+
// M31.5 B (D2): the AI address /api/mcp, off by default; the first boolean setting.
|
|
84
|
+
"mcpEnabled",
|
|
85
|
+
// M31.5 C (D5): how many days an AI connection made by signing in may go unused.
|
|
86
|
+
"aiConnectionIdleDays",
|
|
87
|
+
...RATE_LIMIT_SETTING_KEYS,
|
|
88
|
+
// M32 F4 (D3, D17): the provider choices and the form protection limits, session only.
|
|
89
|
+
...PROVIDER_SETTING_KEYS,
|
|
90
|
+
];
|
|
91
|
+
export const LiveServerSettingKeySchema = z.enum(LIVE_SERVER_SETTING_KEYS);
|
|
92
|
+
export const ServerSettingSourceSchema = z.enum(["stored", "environment", "default"]);
|
|
93
|
+
const NO_SPACE = /\s/;
|
|
94
|
+
const BASE_URL_MESSAGE = "Enter an http or https address with no user name, password, spaces, query or fragment.";
|
|
95
|
+
/** No credentials, no whitespace, and no query or fragment (a bare `?` or `#` included),
|
|
96
|
+
* which the public host reader refuses too. strictUrl has already refused control
|
|
97
|
+
* characters and anything but http or https; the URL global is declared in whatwg-url.d.ts. */
|
|
98
|
+
function isPlainBaseUrl(value) {
|
|
99
|
+
if (NO_SPACE.test(value) || value.includes("?") || value.includes("#"))
|
|
100
|
+
return false;
|
|
101
|
+
try {
|
|
102
|
+
const url = new URL(value);
|
|
103
|
+
return url.username === "" && url.password === "";
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const BaseUrlSchema = strictUrl({ protocol: /^https?$/, max: 2048, error: BASE_URL_MESSAGE }).refine(isPlainBaseUrl, {
|
|
110
|
+
message: BASE_URL_MESSAGE,
|
|
111
|
+
});
|
|
112
|
+
/** M32 F4 (D17): the bounds of the built-in form protection's three limits, for the schema and the admin's help text. */
|
|
113
|
+
export const FORM_PROTECTION_LIMIT_BOUNDS = Object.freeze({
|
|
114
|
+
formProtectionMinSeconds: Object.freeze({ min: 1, max: 60 }),
|
|
115
|
+
formProtectionSendsPerWindow: Object.freeze({ min: 1, max: 100 }),
|
|
116
|
+
formProtectionWindowSeconds: Object.freeze({ min: 60, max: 86_400 }),
|
|
117
|
+
});
|
|
118
|
+
export const LiveServerSettingValueSchemas = {
|
|
119
|
+
previewTokenTtl: z.number().int().min(60).max(2_592_000),
|
|
120
|
+
previewBaseUrl: BaseUrlSchema,
|
|
121
|
+
publicUrl: BaseUrlSchema,
|
|
122
|
+
mediaMaxSize: z.number().int().min(1).max(MEDIA_MAX_SIZE_CEILING_BYTES),
|
|
123
|
+
licenseCheckIntervalHours: z.number().int().min(1).max(504),
|
|
124
|
+
licenseStaleWarnDays: z.number().int().min(1).max(365),
|
|
125
|
+
maxAssetBytes: z.number().int().min(1).max(MAX_ASSET_BYTES_CEILING),
|
|
126
|
+
maxTemplateBytes: z.number().int().min(1).max(MAX_TEMPLATE_BYTES_CEILING),
|
|
127
|
+
licenseGraceDays: z.number().int().min(1).max(LICENSE_GRACE_DAYS_MAX),
|
|
128
|
+
mcpEnabled: z.boolean(),
|
|
129
|
+
aiConnectionIdleDays: AiConnectionIdleDaysSchema,
|
|
130
|
+
rateLimitKeyMax: RateLimitMaxSchema,
|
|
131
|
+
rateLimitIpMax: RateLimitMaxSchema,
|
|
132
|
+
rateLimitWindowSeconds: RateLimitWindowSchema,
|
|
133
|
+
rateLimitDocsMax: RateLimitMaxSchema,
|
|
134
|
+
rateLimitDocsWindowSeconds: RateLimitWindowSchema,
|
|
135
|
+
rateLimitMediaMax: RateLimitMaxSchema,
|
|
136
|
+
rateLimitMediaWindowSeconds: RateLimitWindowSchema,
|
|
137
|
+
rateLimitRenderMax: RateLimitMaxSchema,
|
|
138
|
+
rateLimitRenderWindowSeconds: RateLimitWindowSchema,
|
|
139
|
+
rateLimitAdminMax: RateLimitMaxSchema,
|
|
140
|
+
rateLimitAdminWindowSeconds: RateLimitWindowSchema,
|
|
141
|
+
formProtectionProvider: ProviderChoiceSchema,
|
|
142
|
+
searchProvider: ProviderChoiceSchema,
|
|
143
|
+
mediaStore: ProviderChoiceSchema,
|
|
144
|
+
mailSender: ProviderChoiceSchema,
|
|
145
|
+
formProtectionMinSeconds: z.number().int().min(FORM_PROTECTION_LIMIT_BOUNDS.formProtectionMinSeconds.min).max(FORM_PROTECTION_LIMIT_BOUNDS.formProtectionMinSeconds.max),
|
|
146
|
+
formProtectionSendsPerWindow: z.number().int().min(FORM_PROTECTION_LIMIT_BOUNDS.formProtectionSendsPerWindow.min).max(FORM_PROTECTION_LIMIT_BOUNDS.formProtectionSendsPerWindow.max),
|
|
147
|
+
formProtectionWindowSeconds: z.number().int().min(FORM_PROTECTION_LIMIT_BOUNDS.formProtectionWindowSeconds.min).max(FORM_PROTECTION_LIMIT_BOUNDS.formProtectionWindowSeconds.max),
|
|
148
|
+
};
|
|
149
|
+
/** A key left out is unchanged; null clears the stored value (back to the environment). */
|
|
150
|
+
export const UpdateServerSettingsRequestSchema = z
|
|
151
|
+
.object({
|
|
152
|
+
previewTokenTtl: LiveServerSettingValueSchemas.previewTokenTtl.nullable().optional(),
|
|
153
|
+
previewBaseUrl: LiveServerSettingValueSchemas.previewBaseUrl.nullable().optional(),
|
|
154
|
+
publicUrl: LiveServerSettingValueSchemas.publicUrl.nullable().optional(),
|
|
155
|
+
mediaMaxSize: LiveServerSettingValueSchemas.mediaMaxSize.nullable().optional(),
|
|
156
|
+
licenseCheckIntervalHours: LiveServerSettingValueSchemas.licenseCheckIntervalHours.nullable().optional(),
|
|
157
|
+
licenseStaleWarnDays: LiveServerSettingValueSchemas.licenseStaleWarnDays.nullable().optional(),
|
|
158
|
+
maxAssetBytes: LiveServerSettingValueSchemas.maxAssetBytes.nullable().optional(),
|
|
159
|
+
maxTemplateBytes: LiveServerSettingValueSchemas.maxTemplateBytes.nullable().optional(),
|
|
160
|
+
licenseGraceDays: LiveServerSettingValueSchemas.licenseGraceDays.nullable().optional(),
|
|
161
|
+
mcpEnabled: LiveServerSettingValueSchemas.mcpEnabled.nullable().optional(),
|
|
162
|
+
aiConnectionIdleDays: LiveServerSettingValueSchemas.aiConnectionIdleDays.nullable().optional(),
|
|
163
|
+
rateLimitKeyMax: LiveServerSettingValueSchemas.rateLimitKeyMax.nullable().optional(),
|
|
164
|
+
rateLimitIpMax: LiveServerSettingValueSchemas.rateLimitIpMax.nullable().optional(),
|
|
165
|
+
rateLimitWindowSeconds: LiveServerSettingValueSchemas.rateLimitWindowSeconds.nullable().optional(),
|
|
166
|
+
rateLimitDocsMax: LiveServerSettingValueSchemas.rateLimitDocsMax.nullable().optional(),
|
|
167
|
+
rateLimitDocsWindowSeconds: LiveServerSettingValueSchemas.rateLimitDocsWindowSeconds.nullable().optional(),
|
|
168
|
+
rateLimitMediaMax: LiveServerSettingValueSchemas.rateLimitMediaMax.nullable().optional(),
|
|
169
|
+
rateLimitMediaWindowSeconds: LiveServerSettingValueSchemas.rateLimitMediaWindowSeconds.nullable().optional(),
|
|
170
|
+
rateLimitRenderMax: LiveServerSettingValueSchemas.rateLimitRenderMax.nullable().optional(),
|
|
171
|
+
rateLimitRenderWindowSeconds: LiveServerSettingValueSchemas.rateLimitRenderWindowSeconds.nullable().optional(),
|
|
172
|
+
rateLimitAdminMax: LiveServerSettingValueSchemas.rateLimitAdminMax.nullable().optional(),
|
|
173
|
+
rateLimitAdminWindowSeconds: LiveServerSettingValueSchemas.rateLimitAdminWindowSeconds.nullable().optional(),
|
|
174
|
+
formProtectionProvider: LiveServerSettingValueSchemas.formProtectionProvider.nullable().optional(),
|
|
175
|
+
searchProvider: LiveServerSettingValueSchemas.searchProvider.nullable().optional(),
|
|
176
|
+
mediaStore: LiveServerSettingValueSchemas.mediaStore.nullable().optional(),
|
|
177
|
+
mailSender: LiveServerSettingValueSchemas.mailSender.nullable().optional(),
|
|
178
|
+
formProtectionMinSeconds: LiveServerSettingValueSchemas.formProtectionMinSeconds.nullable().optional(),
|
|
179
|
+
formProtectionSendsPerWindow: LiveServerSettingValueSchemas.formProtectionSendsPerWindow.nullable().optional(),
|
|
180
|
+
formProtectionWindowSeconds: LiveServerSettingValueSchemas.formProtectionWindowSeconds.nullable().optional(),
|
|
181
|
+
})
|
|
182
|
+
.strict()
|
|
183
|
+
.refine((change) => Object.keys(change).length > 0, { message: "Name at least one setting to change." });
|
|
184
|
+
const SettingValueSchema = z.union([z.number(), z.string(), z.boolean(), z.null()]);
|
|
185
|
+
export const LiveServerSettingRowSchema = z.object({
|
|
186
|
+
key: LiveServerSettingKeySchema,
|
|
187
|
+
envName: z.string(),
|
|
188
|
+
value: SettingValueSchema,
|
|
189
|
+
source: ServerSettingSourceSchema,
|
|
190
|
+
/** The variable as the environment holds it, or null when it is unset. */
|
|
191
|
+
environment: z.string().nullable(),
|
|
192
|
+
defaultValue: SettingValueSchema,
|
|
193
|
+
/** For a stored value, the line that would set the same value in `.env` (S358 P1). */
|
|
194
|
+
envLine: z.string().nullable(),
|
|
195
|
+
});
|
|
196
|
+
export const RestartOnlySettingRowSchema = z.object({
|
|
197
|
+
envName: z.string(),
|
|
198
|
+
environment: z.string().nullable(),
|
|
199
|
+
/** "registration": read when the server starts (S236b). "boundary": kept out of the admin on purpose. */
|
|
200
|
+
reason: z.enum(["registration", "boundary"]),
|
|
201
|
+
});
|
|
202
|
+
export const ServerSettingsResponseSchema = z.object({
|
|
203
|
+
live: z.array(LiveServerSettingRowSchema),
|
|
204
|
+
restartOnly: z.array(RestartOnlySettingRowSchema),
|
|
205
|
+
});
|
|
@@ -8,8 +8,64 @@ export declare const BundledTemplateSchema: z.ZodObject<{
|
|
|
8
8
|
sampleContentDescription: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
9
9
|
en: z.ZodString;
|
|
10
10
|
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
11
|
+
settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
type: z.ZodEnum<{
|
|
14
|
+
number: "number";
|
|
15
|
+
secret: "secret";
|
|
16
|
+
text: "text";
|
|
17
|
+
choice: "choice";
|
|
18
|
+
onOff: "onOff";
|
|
19
|
+
}>;
|
|
20
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
21
|
+
en: z.ZodString;
|
|
22
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
23
|
+
description: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
24
|
+
en: z.ZodString;
|
|
25
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
26
|
+
askAtInstall: z.ZodBoolean;
|
|
27
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
28
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
29
|
+
set: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
stored: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
32
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
+
value: z.ZodString;
|
|
34
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
35
|
+
en: z.ZodString;
|
|
36
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
37
|
+
}, z.core.$strict>>>;
|
|
38
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
integer: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
}, z.core.$strict>>>;
|
|
44
|
+
formReplies: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
45
|
+
label: z.ZodString;
|
|
46
|
+
description: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, z.core.$strip>>>;
|
|
48
|
+
offers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
+
action: z.ZodString;
|
|
50
|
+
label: z.ZodString;
|
|
51
|
+
target: z.ZodEnum<{
|
|
52
|
+
"content.read": "content.read";
|
|
53
|
+
"content.update": "content.update";
|
|
54
|
+
"content.publish": "content.publish";
|
|
55
|
+
"media.read": "media.read";
|
|
56
|
+
}>;
|
|
57
|
+
default: z.ZodBoolean;
|
|
58
|
+
roles: z.ZodArray<z.ZodString>;
|
|
59
|
+
rolesIfCreated: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60
|
+
}, z.core.$strip>>>;
|
|
11
61
|
}, z.core.$strip>;
|
|
12
62
|
export type BundledTemplate = z.infer<typeof BundledTemplateSchema>;
|
|
63
|
+
export declare const SetupHandoffFailedStageSchema: z.ZodEnum<{
|
|
64
|
+
build: "build";
|
|
65
|
+
close: "close";
|
|
66
|
+
listen: "listen";
|
|
67
|
+
}>;
|
|
68
|
+
export type SetupHandoffFailedStage = z.infer<typeof SetupHandoffFailedStageSchema>;
|
|
13
69
|
export declare const SetupStatusResponseSchema: z.ZodObject<{
|
|
14
70
|
setupRequired: z.ZodBoolean;
|
|
15
71
|
bundledTemplates: z.ZodArray<z.ZodObject<{
|
|
@@ -21,8 +77,63 @@ export declare const SetupStatusResponseSchema: z.ZodObject<{
|
|
|
21
77
|
sampleContentDescription: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
22
78
|
en: z.ZodString;
|
|
23
79
|
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
80
|
+
settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
81
|
+
id: z.ZodString;
|
|
82
|
+
type: z.ZodEnum<{
|
|
83
|
+
number: "number";
|
|
84
|
+
secret: "secret";
|
|
85
|
+
text: "text";
|
|
86
|
+
choice: "choice";
|
|
87
|
+
onOff: "onOff";
|
|
88
|
+
}>;
|
|
89
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
90
|
+
en: z.ZodString;
|
|
91
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
92
|
+
description: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
93
|
+
en: z.ZodString;
|
|
94
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
95
|
+
askAtInstall: z.ZodBoolean;
|
|
96
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
97
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
98
|
+
set: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
+
stored: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
101
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
+
value: z.ZodString;
|
|
103
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
104
|
+
en: z.ZodString;
|
|
105
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
106
|
+
}, z.core.$strict>>>;
|
|
107
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
integer: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
112
|
+
}, z.core.$strict>>>;
|
|
113
|
+
formReplies: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
114
|
+
label: z.ZodString;
|
|
115
|
+
description: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>>>;
|
|
117
|
+
offers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
118
|
+
action: z.ZodString;
|
|
119
|
+
label: z.ZodString;
|
|
120
|
+
target: z.ZodEnum<{
|
|
121
|
+
"content.read": "content.read";
|
|
122
|
+
"content.update": "content.update";
|
|
123
|
+
"content.publish": "content.publish";
|
|
124
|
+
"media.read": "media.read";
|
|
125
|
+
}>;
|
|
126
|
+
default: z.ZodBoolean;
|
|
127
|
+
roles: z.ZodArray<z.ZodString>;
|
|
128
|
+
rolesIfCreated: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
129
|
+
}, z.core.$strip>>>;
|
|
24
130
|
}, z.core.$strip>>;
|
|
25
131
|
databaseConfigured: z.ZodBoolean;
|
|
132
|
+
handoffFailed: z.ZodOptional<z.ZodEnum<{
|
|
133
|
+
build: "build";
|
|
134
|
+
close: "close";
|
|
135
|
+
listen: "listen";
|
|
136
|
+
}>>;
|
|
26
137
|
}, z.core.$strip>;
|
|
27
138
|
export type SetupStatusResponse = z.infer<typeof SetupStatusResponseSchema>;
|
|
28
139
|
export declare const SetupStarterSelectionSchema: z.ZodObject<{
|
|
@@ -30,8 +141,13 @@ export declare const SetupStarterSelectionSchema: z.ZodObject<{
|
|
|
30
141
|
answers: z.ZodOptional<z.ZodObject<{
|
|
31
142
|
sampleContent: z.ZodOptional<z.ZodBoolean>;
|
|
32
143
|
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
144
|
+
grants: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
145
|
options: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>>, unknown>>;
|
|
146
|
+
settings: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
147
|
+
secret: z.ZodString;
|
|
148
|
+
}, z.core.$strict>]>>, unknown>>;
|
|
34
149
|
}, z.core.$strict>>;
|
|
150
|
+
formReplies: z.ZodOptional<z.ZodBoolean>;
|
|
35
151
|
}, z.core.$strict>;
|
|
36
152
|
export type SetupStarterSelection = z.infer<typeof SetupStarterSelectionSchema>;
|
|
37
153
|
export declare const SetupCompleteRequestSchema: z.ZodObject<{
|
|
@@ -63,8 +179,13 @@ export declare const SetupCompleteRequestSchema: z.ZodObject<{
|
|
|
63
179
|
answers: z.ZodOptional<z.ZodObject<{
|
|
64
180
|
sampleContent: z.ZodOptional<z.ZodBoolean>;
|
|
65
181
|
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
182
|
+
grants: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
183
|
options: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>>, unknown>>;
|
|
184
|
+
settings: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
185
|
+
secret: z.ZodString;
|
|
186
|
+
}, z.core.$strict>]>>, unknown>>;
|
|
67
187
|
}, z.core.$strict>>;
|
|
188
|
+
formReplies: z.ZodOptional<z.ZodBoolean>;
|
|
68
189
|
}, z.core.$strict>>;
|
|
69
190
|
}, z.core.$strip>;
|
|
70
191
|
export type SetupCompleteRequest = z.infer<typeof SetupCompleteRequestSchema>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { NewPasswordSchema } from "./password-reset.schema.js";
|
|
2
3
|
import { InstallAnswersSchema, InstallDescriptionSchema } from "./plugin-install.js";
|
|
3
4
|
import { InstallRoleOutcomeSchema } from "./plugin-install-record.schema.js";
|
|
5
|
+
import { PLUGIN_ACTION_OFFER_TARGETS } from "./plugin-manifest-actions.js";
|
|
6
|
+
import { PluginSettingsFieldViewSchema } from "./plugin-settings.js";
|
|
4
7
|
import { SampleContentOutcomeSchema } from "./sample-content-outcome.schema.js";
|
|
5
8
|
// One bundled first-party starter template (currently only the blog
|
|
6
|
-
// template
|
|
9
|
+
// template, apps/server/src/setup/bundled-templates.ts) offered from the
|
|
7
10
|
// setup wizard's optional "starter template" step. `pluginId` matches the
|
|
8
11
|
// template plugin's manifest id (e.g. "com.kardalum.blog"): the same id the
|
|
9
12
|
// marketplace install flow uses elsewhere, so a template picked here and a
|
|
@@ -19,10 +22,42 @@ export const BundledTemplateSchema = z.object({
|
|
|
19
22
|
// S293: the template's sample-content.json `description`, for the wizard's
|
|
20
23
|
// checkbox.
|
|
21
24
|
sampleContentDescription: InstallDescriptionSchema.optional(),
|
|
25
|
+
// M32 F4d (D5): the template's settings fields marked ask-at-install, labels resolved, each at its
|
|
26
|
+
// default; the wizard draws them and sends the answers as `answers.settings`. The server always
|
|
27
|
+
// lists them (an empty list for none); optional for a reader of an older server.
|
|
28
|
+
settings: z.array(PluginSettingsFieldViewSchema).optional(),
|
|
29
|
+
// M32 H (H20): the template's form reply declaration, for the wizard's switch; null or absent for none.
|
|
30
|
+
formReplies: z.object({ label: z.string(), description: z.string().optional() }).nullable().optional(),
|
|
31
|
+
// M33 K29: the actions the template offers to the roles holding a core action, its label in
|
|
32
|
+
// English, the box's derived default, and the seeded roles that hold the target (the
|
|
33
|
+
// administrator left out). The wizard sends the ticked ones as `answers.grants`. Absent for none.
|
|
34
|
+
offers: z
|
|
35
|
+
.array(z.object({
|
|
36
|
+
action: z.string(),
|
|
37
|
+
label: z.string(),
|
|
38
|
+
target: z.enum(PLUGIN_ACTION_OFFER_TARGETS),
|
|
39
|
+
default: z.boolean(),
|
|
40
|
+
/** Exactly the roles a wizard install gives the action: the seeded ones holding the target. */
|
|
41
|
+
roles: z.array(z.string()),
|
|
42
|
+
/**
|
|
43
|
+
* M33 core part 7: the labels (in English) of the template's own offered roles whose actions
|
|
44
|
+
* include the target. They gain the action only when an install creates them, which only an
|
|
45
|
+
* install naming them in `answers.roles` does (an API caller); the wizard never sends
|
|
46
|
+
* `answers.roles`, so it does not show this list. Absent when no offered role holds the target.
|
|
47
|
+
*/
|
|
48
|
+
rolesIfCreated: z.array(z.string()).optional(),
|
|
49
|
+
}))
|
|
50
|
+
.optional(),
|
|
22
51
|
});
|
|
52
|
+
// S357c (D5): where a failed no-restart handover stopped (the server's
|
|
53
|
+
// boot/hand-off-to-full-app.ts). A kind only: the error's own text stays in
|
|
54
|
+
// the server log and never reaches a response. "build": the full app could
|
|
55
|
+
// not be built and the wizard is still served; "close": the setup app did
|
|
56
|
+
// not close cleanly; "listen": the full app could not take the port.
|
|
57
|
+
export const SetupHandoffFailedStageSchema = z.enum(["build", "close", "listen"]);
|
|
23
58
|
export const SetupStatusResponseSchema = z.object({
|
|
24
59
|
setupRequired: z.boolean(),
|
|
25
|
-
// Always present
|
|
60
|
+
// Always present: [] outside setup mode (a fully-configured instance has
|
|
26
61
|
// nothing left to offer here) and whenever nothing bundled is resolvable,
|
|
27
62
|
// never omitted or null.
|
|
28
63
|
bundledTemplates: z.array(BundledTemplateSchema),
|
|
@@ -31,6 +66,9 @@ export const SetupStatusResponseSchema = z.object({
|
|
|
31
66
|
// See the BootMode type and resolveBootMode function in
|
|
32
67
|
// apps/server/src/boot/resolve-boot-mode.ts for the three states.
|
|
33
68
|
databaseConfigured: z.boolean(),
|
|
69
|
+
// S357c (D5): present only after setup completed and the handover to the
|
|
70
|
+
// full app failed, so the wizard can say why it asks for a restart.
|
|
71
|
+
handoffFailed: SetupHandoffFailedStageSchema.optional(),
|
|
34
72
|
});
|
|
35
73
|
const SqliteSelectionSchema = z.object({
|
|
36
74
|
dialect: z.literal("sqlite"),
|
|
@@ -46,26 +84,29 @@ const ServerDialectSelectionSchema = z.object({
|
|
|
46
84
|
});
|
|
47
85
|
// The wizard's optional starter step (Session 151): which bundled template
|
|
48
86
|
// to install during setup completion. Absent entirely = skip, never null.
|
|
49
|
-
// S293: the starter's install answers (the wizard sends `sampleContent
|
|
87
|
+
// S293: the starter's install answers (the wizard sends `sampleContent`, and
|
|
88
|
+
// from M32 F4d (D5) the ask-at-install `settings`), the
|
|
50
89
|
// same object every install door takes; strict, so a caller still sending
|
|
51
90
|
// `includeSampleContent` is refused rather than seeded by default.
|
|
52
91
|
export const SetupStarterSelectionSchema = z
|
|
53
92
|
.object({
|
|
54
93
|
pluginId: z.string().min(1),
|
|
55
94
|
answers: InstallAnswersSchema.optional(),
|
|
95
|
+
// M32 H (H20): the owner's choice to let the starter send form replies.
|
|
96
|
+
formReplies: z.boolean().optional(),
|
|
56
97
|
})
|
|
57
98
|
.strict();
|
|
58
99
|
export const SetupCompleteRequestSchema = z.object({
|
|
59
100
|
admin: z.object({
|
|
60
101
|
email: z.string().email(),
|
|
61
102
|
name: z.string().min(1),
|
|
62
|
-
password:
|
|
103
|
+
password: NewPasswordSchema,
|
|
63
104
|
}),
|
|
64
105
|
// Optional because the wizard has two shapes. On a fresh instance it
|
|
65
106
|
// collects a database selection; when DATABASE_URL was already injected
|
|
66
107
|
// the database is configured and read-only, and the request carries the
|
|
67
|
-
// admin only. The ROUTE enforces the pairing in both directions
|
|
68
|
-
// routes/setup.ts
|
|
108
|
+
// admin only. The ROUTE enforces the pairing in both directions (
|
|
109
|
+
// routes/setup.ts) because "optional" alone would let a caller silently
|
|
69
110
|
// send a selection that is ignored.
|
|
70
111
|
database: z
|
|
71
112
|
.discriminatedUnion("dialect", [
|
|
@@ -77,7 +118,7 @@ export const SetupCompleteRequestSchema = z.object({
|
|
|
77
118
|
starter: SetupStarterSelectionSchema.optional(),
|
|
78
119
|
});
|
|
79
120
|
// What happened to the requested starter. "failed" never fails setup
|
|
80
|
-
// itself
|
|
121
|
+
// itself (the admin account and database config always stand), so this
|
|
81
122
|
// rides alongside success: true rather than replacing it. `reason` is only
|
|
82
123
|
// present on failure.
|
|
83
124
|
export const SetupStarterResultSchema = z.object({
|
|
@@ -94,12 +135,12 @@ export const SetupStarterResultSchema = z.object({
|
|
|
94
135
|
});
|
|
95
136
|
export const SetupCompleteResponseSchema = z.object({
|
|
96
137
|
success: z.literal(true),
|
|
97
|
-
// ABSENT (not null) when no starter was requested
|
|
138
|
+
// ABSENT (not null) when no starter was requested: the skip-path
|
|
98
139
|
// response stays byte-identical to the pre-starter shape.
|
|
99
140
|
starter: SetupStarterResultSchema.optional(),
|
|
100
141
|
// ABSENT unless setup completed but could not write its configuration
|
|
101
|
-
// to disk. Setup itself still succeeded
|
|
102
|
-
// provisioned database stand
|
|
142
|
+
// to disk. Setup itself still succeeded (the admin account and the
|
|
143
|
+
// provisioned database stand), so this rides alongside success: true
|
|
103
144
|
// rather than replacing it, exactly as `starter` does.
|
|
104
145
|
configWarning: z.string().min(1).optional(),
|
|
105
146
|
});
|