@kardalum/plugin-sdk 0.19.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 +211 -0
- package/README.md +19 -0
- package/dist/admin-section-registry.d.ts +16 -1
- package/dist/admin-section-registry.js +23 -0
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +86 -0
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +38 -7
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +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 +7 -1
- package/dist/datatype-validation.d.ts +4 -9
- package/dist/datatype-validation.js +139 -1
- 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 +36 -4
- package/dist/index.js +50 -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 +285 -23
- package/dist/manifest.d.ts +450 -51
- package/dist/manifest.js +1 -1
- package/dist/media/media-picker.js +31 -18
- package/dist/media/upload-error.d.ts +5 -1
- package/dist/media/upload-error.js +14 -2
- package/dist/media-library.d.ts +32 -0
- package/dist/media-library.js +15 -0
- package/dist/nested-field-host.d.ts +76 -0
- package/dist/nested-field-host.js +90 -0
- package/dist/notify.d.ts +12 -4
- package/dist/notify.js +1 -1
- package/dist/outbound.d.ts +47 -0
- package/dist/outbound.js +1 -0
- package/dist/plugin-context.d.ts +5 -0
- 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/richtext/block-panel.js +11 -6
- package/dist/richtext/insert-menu.js +9 -6
- package/dist/richtext/style-listbox.js +6 -4
- 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 +24 -24
- package/dist/structured-storage-types.d.ts +309 -9
- 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/views/asset-view.js +4 -1
- package/dist/views/content-list-preview.js +3 -1
- package/dist/views/content-list-settings-view.js +11 -7
- package/dist/views/content-list-view.d.ts +5 -3
- package/dist/views/content-list-view.js +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 +4 -1
- package/dist/views/file-upload-view.d.ts +5 -7
- package/dist/views/file-upload-view.js +16 -7
- package/dist/views/group-view.d.ts +8 -0
- package/dist/views/group-view.js +123 -0
- package/dist/views/html-view.js +7 -6
- package/dist/views/image-view.js +37 -19
- package/dist/views/link-view.d.ts +3 -0
- package/dist/views/link-view.js +150 -0
- package/dist/views/options-list-view.d.ts +3 -0
- package/dist/views/options-list-view.js +104 -0
- package/dist/views/repeatable-list-view.d.ts +3 -0
- package/dist/views/repeatable-list-view.js +113 -0
- package/dist/views/rich-text-view.js +28 -13
- 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-key-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +7 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +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 +115 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +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-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 +8 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +180 -15
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +41 -5
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +90 -5
- package/node_modules/@kardalum/api-schemas/dist/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 +117 -41
- package/node_modules/@kardalum/api-schemas/dist/index.js +89 -26
- 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/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 +312 -8
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +43 -3
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +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.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 +335 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +242 -2
- 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-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 +47 -4
- 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/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 +90 -8
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +59 -1
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +110 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +34 -2
- 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/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.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +58 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +34 -3
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
- package/node_modules/@kardalum/api-schemas/package.json +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +6 -0
- 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/tokens.css +15 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +12 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +8 -3
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +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 +25 -4
- 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/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/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
- package/package.json +12 -2
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { labelMapSchema, labelTextSchema, resolveLabel } from "./plugin-labels.js";
|
|
3
|
+
// M33 K2: one detail line of a derived capability. A plain string is an
|
|
4
|
+
// identifier shown as written (every detail before K2, still valid). An
|
|
5
|
+
// object carries the plugin's own words (`text`, one string or a map read
|
|
6
|
+
// in the reader's language) and the core's words (`notes`), each note an id
|
|
7
|
+
// from a closed list whose words live where capability labels live: English
|
|
8
|
+
// in the SDK's capabilities file, three languages in the admin's locale
|
|
9
|
+
// files and the marketplace's dictionaries. The core's sentences are never
|
|
10
|
+
// carried inside the derivation, so a reader in a fourth language still
|
|
11
|
+
// reads them in its own words once they are worded there.
|
|
12
|
+
/** The core's notes. The list only grows: an id is persisted on a
|
|
13
|
+
* marketplace version row and read by three surfaces, so a removed or
|
|
14
|
+
* renamed id is a data change, not a cosmetic one. */
|
|
15
|
+
export const CAPABILITY_NOTES = [
|
|
16
|
+
"rawBody",
|
|
17
|
+
"identifiesPeople",
|
|
18
|
+
"durable",
|
|
19
|
+
"methods",
|
|
20
|
+
"leavesServer",
|
|
21
|
+
"setsTitle",
|
|
22
|
+
"embedFrom",
|
|
23
|
+
"embedKindMap",
|
|
24
|
+
"embedKindContent",
|
|
25
|
+
"privacyNoticeAt",
|
|
26
|
+
"addsScript",
|
|
27
|
+
];
|
|
28
|
+
/** The longest value a note may carry (a method list, an origin, a host). */
|
|
29
|
+
export const CAPABILITY_NOTE_VALUE_MAX = 200;
|
|
30
|
+
/** The longest note id a response may carry; the closed list's ids are far shorter. */
|
|
31
|
+
export const CAPABILITY_NOTE_ID_READ_MAX = 64;
|
|
32
|
+
const CapabilityNoteSchema = z.enum(CAPABILITY_NOTES);
|
|
33
|
+
const CAPABILITY_NOTE_SET = new Set(CAPABILITY_NOTES);
|
|
34
|
+
/** Whether this build has words for a note id. */
|
|
35
|
+
export function isCapabilityNote(id) {
|
|
36
|
+
return CAPABILITY_NOTE_SET.has(id);
|
|
37
|
+
}
|
|
38
|
+
/** A detail, as the derivation writes it and every stored listing and
|
|
39
|
+
* reference carries it. A plain string stays unbounded, as before K2; a
|
|
40
|
+
* text map follows the label map rule (`en` required); a note's value is
|
|
41
|
+
* shown as written, so it is a bounded text with no control character. */
|
|
42
|
+
export const CapabilityDetailSchema = z.union([
|
|
43
|
+
z.string(),
|
|
44
|
+
z
|
|
45
|
+
.object({
|
|
46
|
+
text: z.union([z.string(), labelMapSchema()]),
|
|
47
|
+
notes: z
|
|
48
|
+
.array(z.union([CapabilityNoteSchema, z.object({ id: CapabilityNoteSchema, value: labelTextSchema({ max: CAPABILITY_NOTE_VALUE_MAX }) }).strict()]))
|
|
49
|
+
.optional(),
|
|
50
|
+
})
|
|
51
|
+
.strict(),
|
|
52
|
+
]);
|
|
53
|
+
const CapabilityNoteReadSchema = labelTextSchema({ max: CAPABILITY_NOTE_ID_READ_MAX });
|
|
54
|
+
/** A detail as a response carries it: every rule of CapabilityDetailSchema
|
|
55
|
+
* except the closed note list, so an unknown note is kept, not refused. M33
|
|
56
|
+
* part 1 fix wave (critic-2): not strict either, so a key a newer marketplace
|
|
57
|
+
* adds to a detail or a note is dropped, not refused. */
|
|
58
|
+
export const CapabilityDetailReadSchema = z.union([
|
|
59
|
+
z.string(),
|
|
60
|
+
z.object({
|
|
61
|
+
text: z.union([z.string(), labelMapSchema()]),
|
|
62
|
+
notes: z
|
|
63
|
+
.array(z.union([CapabilityNoteReadSchema, z.object({ id: CapabilityNoteReadSchema, value: labelTextSchema({ max: CAPABILITY_NOTE_VALUE_MAX }) })]))
|
|
64
|
+
.optional(),
|
|
65
|
+
}),
|
|
66
|
+
]);
|
|
67
|
+
/** The longest generic line readCapabilityDetail makes of a shape it does not know. */
|
|
68
|
+
export const CAPABILITY_DETAIL_GENERIC_MAX = 200;
|
|
69
|
+
/** M33 part 1 fix wave (critic-2): any value a marketplace sends as a detail, as one this build
|
|
70
|
+
* reads. A known shape is read by CapabilityDetailReadSchema (unknown keys dropped); a note in a
|
|
71
|
+
* shape this build does not know is left out of an otherwise readable detail; any other shape is
|
|
72
|
+
* shown generically, as its JSON text cut to CAPABILITY_DETAIL_GENERIC_MAX characters, so drift is
|
|
73
|
+
* visible and never fails the listing. */
|
|
74
|
+
export function readCapabilityDetail(raw) {
|
|
75
|
+
const parsed = CapabilityDetailReadSchema.safeParse(raw);
|
|
76
|
+
if (parsed.success)
|
|
77
|
+
return parsed.data;
|
|
78
|
+
if (raw !== null && typeof raw === "object" && !Array.isArray(raw)) {
|
|
79
|
+
const { text, notes } = raw;
|
|
80
|
+
const readNotes = Array.isArray(notes)
|
|
81
|
+
? notes.filter((note) => CapabilityDetailReadSchema.safeParse({ text: "x", notes: [note] }).success)
|
|
82
|
+
: [];
|
|
83
|
+
const known = CapabilityDetailReadSchema.safeParse({ text, ...(readNotes.length > 0 ? { notes: readNotes } : {}) });
|
|
84
|
+
if (known.success)
|
|
85
|
+
return known.data;
|
|
86
|
+
}
|
|
87
|
+
let generic;
|
|
88
|
+
try {
|
|
89
|
+
generic = JSON.stringify(raw) ?? String(raw);
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
generic = String(raw);
|
|
93
|
+
}
|
|
94
|
+
return generic.slice(0, CAPABILITY_DETAIL_GENERIC_MAX);
|
|
95
|
+
}
|
|
96
|
+
/** The place in a note's words where its value is printed. */
|
|
97
|
+
const NOTE_VALUE_SLOT = "{{value}}";
|
|
98
|
+
/** The identifier a detail names, in the reader's language: a plain string
|
|
99
|
+
* as written, else its `text` (a map read as resolveLabel reads it). For a
|
|
100
|
+
* reader that takes the detail as a value, such as a vendor host. */
|
|
101
|
+
export function capabilityDetailText(detail, language = "en") {
|
|
102
|
+
return typeof detail === "string" ? detail : resolveLabel(detail.text, language);
|
|
103
|
+
}
|
|
104
|
+
/** One detail line as every reader prints it: a plain string as written; an
|
|
105
|
+
* object's text in the reader's language, then its notes in brackets, each
|
|
106
|
+
* in the words `noteWords` gives for it (the reader's own language, held
|
|
107
|
+
* where its capability names are held). A note's value is printed as
|
|
108
|
+
* written in place of its words' `{{value}}`; a detail with an empty text
|
|
109
|
+
* prints its notes alone; the result is text, never
|
|
110
|
+
* markup. A note with no value drops the slot. A note this build has no
|
|
111
|
+
* words for (a newer marketplace's) is printed as its id, then its value
|
|
112
|
+
* after a colon. */
|
|
113
|
+
export function formatCapabilityDetail(detail, language, noteWords) {
|
|
114
|
+
if (typeof detail === "string")
|
|
115
|
+
return detail;
|
|
116
|
+
const text = resolveLabel(detail.text, language);
|
|
117
|
+
const notes = (detail.notes ?? []).map((note) => {
|
|
118
|
+
if (typeof note === "string")
|
|
119
|
+
return isCapabilityNote(note) ? noteWords(note).split(NOTE_VALUE_SLOT).join("").trim() : note;
|
|
120
|
+
return isCapabilityNote(note.id) ? noteWords(note.id).split(NOTE_VALUE_SLOT).join(note.value) : `${note.id}: ${note.value}`;
|
|
121
|
+
});
|
|
122
|
+
if (notes.length === 0)
|
|
123
|
+
return text;
|
|
124
|
+
// M33 K27: a detail that is only the core's note (the page head's `setsTitle`) prints its words alone.
|
|
125
|
+
return text === "" ? notes.join(", ") : `${text} (${notes.join(", ")})`;
|
|
126
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const CultureSchema: z.ZodString;
|
|
3
|
+
/**
|
|
4
|
+
* L3 fix wave: a language tag a write stores on a page: CultureSchema, at most CULTURE_TAG_STORED_MAX characters,
|
|
5
|
+
* the longest tag a page's language pointer holds on every database. Checked here, at the request's boundary, so a
|
|
6
|
+
* longer tag is the ordinary 400 every other refused tag is, never the adapter's refusal surfacing as a 500.
|
|
7
|
+
*/
|
|
8
|
+
export declare const StoredCultureSchema: z.ZodString;
|
|
3
9
|
export declare const CreateContentRequestSchema: z.ZodObject<{
|
|
4
10
|
documentTypeId: z.ZodString;
|
|
5
11
|
parentId: z.ZodNullable<z.ZodString>;
|
|
@@ -136,6 +142,21 @@ export declare const ContentByAddressQuerySchema: z.ZodObject<{
|
|
|
136
142
|
host: z.ZodOptional<z.ZodString>;
|
|
137
143
|
}, z.core.$strip>;
|
|
138
144
|
export type ContentByAddressQuery = z.infer<typeof ContentByAddressQuerySchema>;
|
|
145
|
+
export declare const ContentServingSchema: z.ZodObject<{
|
|
146
|
+
pages: z.ZodBoolean;
|
|
147
|
+
api: z.ZodBoolean;
|
|
148
|
+
publicReads: z.ZodBoolean;
|
|
149
|
+
pageUrl: z.ZodNullable<z.ZodString>;
|
|
150
|
+
reach: z.ZodEnum<{
|
|
151
|
+
unknown: "unknown";
|
|
152
|
+
shown: "shown";
|
|
153
|
+
notPublished: "notPublished";
|
|
154
|
+
notPublishedInLanguage: "notPublishedInLanguage";
|
|
155
|
+
siteNotPublished: "siteNotPublished";
|
|
156
|
+
}>;
|
|
157
|
+
apiPath: z.ZodNullable<z.ZodString>;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
export type ContentServing = z.infer<typeof ContentServingSchema>;
|
|
139
160
|
export declare const ContentByAddressResponseSchema: z.ZodObject<{
|
|
140
161
|
node: z.ZodObject<{
|
|
141
162
|
id: z.ZodString;
|
|
@@ -182,8 +203,22 @@ export declare const ContentByAddressResponseSchema: z.ZodObject<{
|
|
|
182
203
|
}, z.core.$strip>>;
|
|
183
204
|
}, z.core.$strip>>;
|
|
184
205
|
}, z.core.$strip>;
|
|
206
|
+
serving: z.ZodObject<{
|
|
207
|
+
pages: z.ZodBoolean;
|
|
208
|
+
api: z.ZodBoolean;
|
|
209
|
+
publicReads: z.ZodBoolean;
|
|
210
|
+
pageUrl: z.ZodNullable<z.ZodString>;
|
|
211
|
+
reach: z.ZodEnum<{
|
|
212
|
+
unknown: "unknown";
|
|
213
|
+
shown: "shown";
|
|
214
|
+
notPublished: "notPublished";
|
|
215
|
+
notPublishedInLanguage: "notPublishedInLanguage";
|
|
216
|
+
siteNotPublished: "siteNotPublished";
|
|
217
|
+
}>;
|
|
218
|
+
apiPath: z.ZodNullable<z.ZodString>;
|
|
219
|
+
}, z.core.$strip>;
|
|
185
220
|
}, z.core.$strip>;
|
|
186
|
-
export type ContentByAddressResponse =
|
|
221
|
+
export type ContentByAddressResponse = z.infer<typeof ContentByAddressResponseSchema>;
|
|
187
222
|
export declare const SaveContentRequestSchema: z.ZodObject<{
|
|
188
223
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
189
224
|
culture: z.ZodOptional<z.ZodString>;
|
|
@@ -243,10 +278,10 @@ export type LatestVersionResponse = z.infer<typeof LatestVersionResponseSchema>;
|
|
|
243
278
|
export declare const ContentVersionMetaSchema: z.ZodObject<{
|
|
244
279
|
id: z.ZodString;
|
|
245
280
|
createdAt: z.ZodString;
|
|
281
|
+
createdBy: z.ZodString;
|
|
246
282
|
version: z.ZodNumber;
|
|
247
283
|
contentId: z.ZodString;
|
|
248
284
|
cultureData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
249
|
-
createdBy: z.ZodString;
|
|
250
285
|
}, z.core.$strip>;
|
|
251
286
|
export type ContentVersionMeta = z.infer<typeof ContentVersionMetaSchema>;
|
|
252
287
|
export declare const VersionListQuerySchema: z.ZodObject<{
|
|
@@ -258,10 +293,10 @@ export declare const VersionListResponseSchema: z.ZodObject<{
|
|
|
258
293
|
items: z.ZodArray<z.ZodObject<{
|
|
259
294
|
id: z.ZodString;
|
|
260
295
|
createdAt: z.ZodString;
|
|
296
|
+
createdBy: z.ZodString;
|
|
261
297
|
version: z.ZodNumber;
|
|
262
298
|
contentId: z.ZodString;
|
|
263
299
|
cultureData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
264
|
-
createdBy: z.ZodString;
|
|
265
300
|
}, z.core.$strip>>;
|
|
266
301
|
nextCursor: z.ZodNullable<z.ZodNumber>;
|
|
267
302
|
}, z.core.$strip>;
|
|
@@ -394,6 +429,77 @@ export declare const CopyContentRequestSchema: z.ZodObject<{
|
|
|
394
429
|
}, z.core.$strip>;
|
|
395
430
|
export type CopyContentRequest = z.infer<typeof CopyContentRequestSchema>;
|
|
396
431
|
export type CopyContentRequestInput = z.input<typeof CopyContentRequestSchema>;
|
|
432
|
+
export declare const CopyContentResponseSchema: z.ZodObject<{
|
|
433
|
+
readOnlyFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
434
|
+
fieldAlias: z.ZodString;
|
|
435
|
+
pluginId: z.ZodString;
|
|
436
|
+
message: z.ZodString;
|
|
437
|
+
}, z.core.$strip>>>;
|
|
438
|
+
node: z.ZodObject<{
|
|
439
|
+
id: z.ZodString;
|
|
440
|
+
parentId: z.ZodNullable<z.ZodString>;
|
|
441
|
+
path: z.ZodString;
|
|
442
|
+
depth: z.ZodNumber;
|
|
443
|
+
sortOrder: z.ZodNumber;
|
|
444
|
+
documentTypeId: z.ZodString;
|
|
445
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
446
|
+
name: z.ZodOptional<z.ZodString>;
|
|
447
|
+
}, z.core.$strip>;
|
|
448
|
+
url: z.ZodNullable<z.ZodString>;
|
|
449
|
+
version: z.ZodObject<{
|
|
450
|
+
id: z.ZodString;
|
|
451
|
+
contentId: z.ZodString;
|
|
452
|
+
version: z.ZodNumber;
|
|
453
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
454
|
+
cultureData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
455
|
+
createdAt: z.ZodString;
|
|
456
|
+
createdBy: z.ZodString;
|
|
457
|
+
}, z.core.$strip>;
|
|
458
|
+
culture: z.ZodNullable<z.ZodObject<{
|
|
459
|
+
culture: z.ZodString;
|
|
460
|
+
currentVersion: z.ZodNumber;
|
|
461
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
462
|
+
}, z.core.$strip>>;
|
|
463
|
+
access: z.ZodObject<{
|
|
464
|
+
read: z.ZodBoolean;
|
|
465
|
+
create: z.ZodBoolean;
|
|
466
|
+
update: z.ZodBoolean;
|
|
467
|
+
publish: z.ZodBoolean;
|
|
468
|
+
delete: z.ZodBoolean;
|
|
469
|
+
denied: z.ZodRecord<z.ZodEnum<{
|
|
470
|
+
"content.read": "content.read";
|
|
471
|
+
"content.create": "content.create";
|
|
472
|
+
"content.update": "content.update";
|
|
473
|
+
"content.publish": "content.publish";
|
|
474
|
+
"content.delete": "content.delete";
|
|
475
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
476
|
+
reason: z.ZodEnum<{
|
|
477
|
+
"role-lacks-action": "role-lacks-action";
|
|
478
|
+
"not-granted": "not-granted";
|
|
479
|
+
}>;
|
|
480
|
+
decidedAt: z.ZodNullable<z.ZodObject<{
|
|
481
|
+
nodeId: z.ZodString;
|
|
482
|
+
path: z.ZodNullable<z.ZodString>;
|
|
483
|
+
name: z.ZodNullable<z.ZodString>;
|
|
484
|
+
mode: z.ZodEnum<{
|
|
485
|
+
restricted: "restricted";
|
|
486
|
+
open: "open";
|
|
487
|
+
}>;
|
|
488
|
+
grants: z.ZodArray<z.ZodObject<{
|
|
489
|
+
subjectKind: z.ZodEnum<{
|
|
490
|
+
role: "role";
|
|
491
|
+
user: "user";
|
|
492
|
+
}>;
|
|
493
|
+
subjectId: z.ZodString;
|
|
494
|
+
label: z.ZodNullable<z.ZodString>;
|
|
495
|
+
}, z.core.$strip>>;
|
|
496
|
+
}, z.core.$strip>>;
|
|
497
|
+
}, z.core.$strip>>;
|
|
498
|
+
}, z.core.$strip>;
|
|
499
|
+
prunedPicks: z.ZodNumber;
|
|
500
|
+
prunedUntyped: z.ZodNumber;
|
|
501
|
+
}, z.core.$strip>;
|
|
502
|
+
export type CopyContentResponse = z.infer<typeof CopyContentResponseSchema>;
|
|
397
503
|
export declare const MoveContentRequestSchema: z.ZodObject<{
|
|
398
504
|
targetParentId: z.ZodNullable<z.ZodString>;
|
|
399
505
|
}, z.core.$strip>;
|
|
@@ -521,10 +627,13 @@ export declare const FieldValidationFailureSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
521
627
|
key: z.ZodString;
|
|
522
628
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
523
629
|
path: z.ZodOptional<z.ZodString>;
|
|
630
|
+
text: z.ZodOptional<z.ZodString>;
|
|
631
|
+
plugin: z.ZodOptional<z.ZodString>;
|
|
524
632
|
}, z.core.$strip>, z.ZodObject<{
|
|
525
633
|
fieldId: z.ZodString;
|
|
526
634
|
message: z.ZodString;
|
|
527
635
|
path: z.ZodOptional<z.ZodString>;
|
|
636
|
+
plugin: z.ZodOptional<z.ZodString>;
|
|
528
637
|
}, z.core.$strip>]>;
|
|
529
638
|
export type FieldValidationFailureResponse = z.infer<typeof FieldValidationFailureSchema>;
|
|
530
639
|
export declare const ContentValidationErrorSchema: z.ZodObject<{
|
|
@@ -534,10 +643,13 @@ export declare const ContentValidationErrorSchema: z.ZodObject<{
|
|
|
534
643
|
key: z.ZodString;
|
|
535
644
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
536
645
|
path: z.ZodOptional<z.ZodString>;
|
|
646
|
+
text: z.ZodOptional<z.ZodString>;
|
|
647
|
+
plugin: z.ZodOptional<z.ZodString>;
|
|
537
648
|
}, z.core.$strip>, z.ZodObject<{
|
|
538
649
|
fieldId: z.ZodString;
|
|
539
650
|
message: z.ZodString;
|
|
540
651
|
path: z.ZodOptional<z.ZodString>;
|
|
652
|
+
plugin: z.ZodOptional<z.ZodString>;
|
|
541
653
|
}, z.core.$strip>]>>;
|
|
542
654
|
heldByPath: z.ZodOptional<z.ZodString>;
|
|
543
655
|
}, z.core.$strip>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ReadOnlyFieldSchema } from "./plugin-read-only.schema.js";
|
|
3
3
|
import { RESERVED_ROOT_SLUGS, isReservedRootSlug } from "./reserved-slugs.js";
|
|
4
|
-
import { ContentNodeSchema, NodeCultureSchema } from "./content.schema.js";
|
|
4
|
+
import { CULTURE_TAG_STORED_MAX, ContentNodeSchema, NodeCultureSchema } from "./content.schema.js";
|
|
5
5
|
import { ContentVersionSchema } from "./content-version.schema.js";
|
|
6
6
|
import { NodeAccessFlagsSchema } from "./node-access.schema.js";
|
|
7
7
|
// createdBy is deliberately absent from mutation request bodies: it comes
|
|
@@ -19,6 +19,12 @@ import { NodeAccessFlagsSchema } from "./node-access.schema.js";
|
|
|
19
19
|
export const CultureSchema = z
|
|
20
20
|
.string()
|
|
21
21
|
.regex(/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/, "Use a language tag such as en, de or pt-BR.");
|
|
22
|
+
/**
|
|
23
|
+
* L3 fix wave: a language tag a write stores on a page: CultureSchema, at most CULTURE_TAG_STORED_MAX characters,
|
|
24
|
+
* the longest tag a page's language pointer holds on every database. Checked here, at the request's boundary, so a
|
|
25
|
+
* longer tag is the ordinary 400 every other refused tag is, never the adapter's refusal surfacing as a 500.
|
|
26
|
+
*/
|
|
27
|
+
export const StoredCultureSchema = CultureSchema.max(CULTURE_TAG_STORED_MAX, `A language tag is at most ${CULTURE_TAG_STORED_MAX} characters.`);
|
|
22
28
|
export const CreateContentRequestSchema = z.object({
|
|
23
29
|
documentTypeId: z.string().uuid(),
|
|
24
30
|
parentId: z.string().uuid().nullable(),
|
|
@@ -76,8 +82,8 @@ export const ContentByPathResponseSchema = z.object({
|
|
|
76
82
|
});
|
|
77
83
|
// S277c: the admin's by-address lookup reads `path` as a visitor's address
|
|
78
84
|
// (GET /api/manage/v1/content/by-address), where by-path reads it as a stored path.
|
|
79
|
-
// The
|
|
80
|
-
//
|
|
85
|
+
// The node it finds is described exactly as by-path describes it, stored path
|
|
86
|
+
// included; the answer adds `serving` (below).
|
|
81
87
|
//
|
|
82
88
|
// S277d: an address is a host and a path once a site can have its own
|
|
83
89
|
// domain. `host` is the host to read the address on; without it the
|
|
@@ -94,14 +100,41 @@ export const ContentByAddressQuerySchema = z.object({
|
|
|
94
100
|
.optional()
|
|
95
101
|
.describe("The host to read the address on: a host name or an IPv4 address with an optional port. A port selects a site whose domain was stored with that port; a scheme in front is ignored. Defaults to the host of this request."),
|
|
96
102
|
});
|
|
97
|
-
|
|
103
|
+
// M33 Reading time task 1: what this install serves, so the admin's screen for a content URL says
|
|
104
|
+
// where the page really is. The admin cannot read the switches itself without settings.read.
|
|
105
|
+
export const ContentServingSchema = z.object({
|
|
106
|
+
/** True when this server registered its page rendering at start-up (KARDALUM_RENDER). */
|
|
107
|
+
pages: z.boolean(),
|
|
108
|
+
/** True when this server registered the delivery API (/api/v1) at start-up (KARDALUM_HEADLESS). */
|
|
109
|
+
api: z.boolean(),
|
|
110
|
+
/** True when the delivery API reads published content with no key (KARDALUM_PUBLIC_READS, with api). */
|
|
111
|
+
publicReads: z.boolean(),
|
|
112
|
+
/** Where a visitor reads the page, in the language the address named (else the default one): a
|
|
113
|
+
* full URL when the server knows its public URL or the site has a domain, otherwise the visitor
|
|
114
|
+
* path. Null while pages is false, and for a page no visitor reaches (not published, or of an
|
|
115
|
+
* unpublished site with a domain of its own) or one the asker may not read. */
|
|
116
|
+
pageUrl: z.string().nullable(),
|
|
117
|
+
/** Whether a visitor reads the page at the address asked about, by the renderer's own rule: in
|
|
118
|
+
* the address's language when it is published in that language or in the default one.
|
|
119
|
+
* `shown`: it is (`pageUrl` may still be null, when no link can be made from the admin's own
|
|
120
|
+
* address); `notPublished`: published in no language; `notPublishedInLanguage`: published only
|
|
121
|
+
* in other languages; `siteNotPublished`: published, but its site is not and has a domain of
|
|
122
|
+
* its own, so no address serves it; `unknown`: the asker may not read the page, so nothing more
|
|
123
|
+
* is said about it. */
|
|
124
|
+
reach: z.enum(["shown", "notPublished", "notPublishedInLanguage", "siteNotPublished", "unknown"]),
|
|
125
|
+
/** The delivery API address that answers this page, a path on this server (the stored path, and
|
|
126
|
+
* the language when the address named one other than the default). Null while api is false,
|
|
127
|
+
* for a page the API answers 404 for in that language, and for one the asker may not read. */
|
|
128
|
+
apiPath: z.string().nullable(),
|
|
129
|
+
});
|
|
130
|
+
export const ContentByAddressResponseSchema = ContentByPathResponseSchema.extend({ serving: ContentServingSchema });
|
|
98
131
|
export const SaveContentRequestSchema = z.object({
|
|
99
132
|
data: z.record(z.string(), z.unknown()),
|
|
100
133
|
// S230: which culture the varying fields in `data` belong to. Omitted
|
|
101
134
|
// means the site's default culture. Publish already took a culture; save
|
|
102
135
|
// did not, so there was no route by which German content could be saved
|
|
103
136
|
// at all, only published.
|
|
104
|
-
culture:
|
|
137
|
+
culture: StoredCultureSchema.optional(),
|
|
105
138
|
// S233: the version the editor had loaded when it saved. The other
|
|
106
139
|
// languages' slices are carried from this version instead of the latest,
|
|
107
140
|
// so a save from a loaded old version stores what every language tab
|
|
@@ -179,7 +212,7 @@ export const PublishContentRequestSchema = z.object({
|
|
|
179
212
|
version: z.number().int().positive().optional(),
|
|
180
213
|
// S229b: which culture's pointer to move. Omitted = the site's default
|
|
181
214
|
// culture, resolved server-side from Settings.
|
|
182
|
-
culture:
|
|
215
|
+
culture: StoredCultureSchema.optional(),
|
|
183
216
|
});
|
|
184
217
|
// S233: publish-all at a version other than the latest, the whole-node
|
|
185
218
|
// rollback. Omitted = the latest saved version, as before.
|
|
@@ -275,6 +308,12 @@ export const CopyContentRequestSchema = z.object({
|
|
|
275
308
|
// is the common case and stays the default.
|
|
276
309
|
includeChildren: z.boolean().default(false),
|
|
277
310
|
});
|
|
311
|
+
// M32 I2 (A5): a copy answers how many picked pages it took out of the copy. M32 I5 (D12):
|
|
312
|
+
// `prunedUntyped` counts the stored values it left out because no data type can read them.
|
|
313
|
+
export const CopyContentResponseSchema = ContentItemResponseSchema.extend({
|
|
314
|
+
prunedPicks: z.number().int().nonnegative(),
|
|
315
|
+
prunedUntyped: z.number().int().nonnegative(),
|
|
316
|
+
});
|
|
278
317
|
export const MoveContentRequestSchema = z.object({
|
|
279
318
|
targetParentId: z.string().uuid().nullable(),
|
|
280
319
|
});
|
|
@@ -318,21 +357,27 @@ export const ReorderNodesResponseSchema = z.object({
|
|
|
318
357
|
// Two reporting routes (S198): a webmaster-configured rule and a built-in
|
|
319
358
|
// datatype's hook both report `key` (a translation key the admin already
|
|
320
359
|
// renders); a third-party datatype's hook reports `message` (its own
|
|
321
|
-
// string
|
|
322
|
-
//
|
|
323
|
-
//
|
|
324
|
-
//
|
|
360
|
+
// string), or since M33 K46 a `key` from its own locales with `plugin`, the
|
|
361
|
+
// plugin's id the core sets, naming the namespace the key is read in. Exactly
|
|
362
|
+
// one of `key` and `message` is present, and `path` names a sub-key inside a
|
|
363
|
+
// composite value (a date range's "end") so the form can mark the precise
|
|
364
|
+
// sub-input rather than the whole field.
|
|
325
365
|
export const FieldValidationFailureSchema = z.union([
|
|
326
366
|
z.object({
|
|
327
367
|
fieldId: z.string(),
|
|
328
368
|
key: z.string(),
|
|
329
369
|
params: z.record(z.string(), z.unknown()).optional(),
|
|
330
370
|
path: z.string().optional(),
|
|
371
|
+
// M32 I5 (D14): the key in English, beside the key, for a caller with no locale of its own.
|
|
372
|
+
// M33 K46: for a plugin's key, its own English message, or a generic sentence; never the key.
|
|
373
|
+
text: z.string().optional(),
|
|
374
|
+
plugin: z.string().optional().describe("Set on a plugin data type's failure: the plugin's id, whose own locales hold the key. Set by the server, never by the plugin."),
|
|
331
375
|
}),
|
|
332
376
|
z.object({
|
|
333
377
|
fieldId: z.string(),
|
|
334
378
|
message: z.string(),
|
|
335
379
|
path: z.string().optional(),
|
|
380
|
+
plugin: z.string().optional().describe("Set on a plugin data type's failure: the plugin's id. Set by the server, never by the plugin."),
|
|
336
381
|
}),
|
|
337
382
|
]);
|
|
338
383
|
export const ContentValidationErrorSchema = z.object({
|
|
@@ -348,7 +393,9 @@ export const ContentValidationErrorSchema = z.object({
|
|
|
348
393
|
// language dimension at all.
|
|
349
394
|
export const CultureSettingsSchema = z
|
|
350
395
|
.object({
|
|
351
|
-
|
|
396
|
+
// M32 L3: a page's language pointer stores at most CULTURE_TAG_STORED_MAX characters on every dialect, so
|
|
397
|
+
// the site never lists a language its pages could not be saved in.
|
|
398
|
+
cultures: z.array(StoredCultureSchema).min(1),
|
|
352
399
|
defaultCulture: CultureSchema,
|
|
353
400
|
})
|
|
354
401
|
.refine((value) => value.cultures.includes(value.defaultCulture), {
|
|
@@ -16,9 +16,9 @@ export declare const ContentListColumnSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
16
16
|
url: "url";
|
|
17
17
|
id: "id";
|
|
18
18
|
name: "name";
|
|
19
|
+
updatedAt: "updatedAt";
|
|
19
20
|
publishedAt: "publishedAt";
|
|
20
21
|
status: "status";
|
|
21
|
-
updatedAt: "updatedAt";
|
|
22
22
|
}>;
|
|
23
23
|
}, z.core.$strict>, z.ZodObject<{
|
|
24
24
|
kind: z.ZodLiteral<"field">;
|
|
@@ -33,9 +33,9 @@ export declare const ContentListSettingsSchema: z.ZodObject<{
|
|
|
33
33
|
url: "url";
|
|
34
34
|
id: "id";
|
|
35
35
|
name: "name";
|
|
36
|
+
updatedAt: "updatedAt";
|
|
36
37
|
publishedAt: "publishedAt";
|
|
37
38
|
status: "status";
|
|
38
|
-
updatedAt: "updatedAt";
|
|
39
39
|
}>;
|
|
40
40
|
}, z.core.$strict>, z.ZodObject<{
|
|
41
41
|
kind: z.ZodLiteral<"field">;
|
|
@@ -156,3 +156,58 @@ export declare const ContentListResponseSchema: z.ZodObject<{
|
|
|
156
156
|
}, z.core.$strip>;
|
|
157
157
|
export type ContentListResponse = z.infer<typeof ContentListResponseSchema>;
|
|
158
158
|
export declare const CONTENT_LIST_DATA_TYPE_CONFIG: DataTypeConfig;
|
|
159
|
+
export declare const CONTENT_LIST_LIMIT_MAX = 50;
|
|
160
|
+
export declare const CONTENT_LIST_LIMIT_DEFAULT = 10;
|
|
161
|
+
export declare const CONTENT_LIST_SORT_MAX = 80;
|
|
162
|
+
/** A text sort compares the first 100 characters (code points) of the value. */
|
|
163
|
+
export declare const CONTENT_LIST_SORT_VALUE_MAX = 100;
|
|
164
|
+
export declare const CONTENT_LIST_MARKER_MAX = 1024;
|
|
165
|
+
/** A field sort runs only when its scope holds at most this many published pages (D7). */
|
|
166
|
+
export declare const CONTENT_LIST_FIELD_SORT_MAX = 5000;
|
|
167
|
+
export declare const CONTENT_LIST_FIELD_ID_MAX = 64;
|
|
168
|
+
export declare const TEMPLATE_SEARCH_TEXT_MAX = 200;
|
|
169
|
+
export declare const TEMPLATE_SEARCH_CURSOR_MAX = 512;
|
|
170
|
+
export declare const TEMPLATE_SEARCH_LIMIT_MAX = 20;
|
|
171
|
+
export declare const TEMPLATE_SEARCH_LIMIT_DEFAULT = 10;
|
|
172
|
+
export declare const TEMPLATE_SEARCHES_MAX = 2;
|
|
173
|
+
/** The longest document type name `{% list %}` and `{% search %}` read as `type:`. */
|
|
174
|
+
export declare const TEMPLATE_TYPE_NAME_MAX = 200;
|
|
175
|
+
export declare const ContentListArgsSchema: z.ZodObject<{
|
|
176
|
+
type: z.ZodOptional<z.ZodString>;
|
|
177
|
+
parent: z.ZodOptional<z.ZodUnknown>;
|
|
178
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
179
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
180
|
+
paged: z.ZodOptional<z.ZodBoolean>;
|
|
181
|
+
}, z.core.$strict>;
|
|
182
|
+
export type ContentListArgs = z.infer<typeof ContentListArgsSchema>;
|
|
183
|
+
export type ContentListDirection = "asc" | "desc";
|
|
184
|
+
export type ContentListSortKey = {
|
|
185
|
+
kind: "published";
|
|
186
|
+
} | {
|
|
187
|
+
kind: "order";
|
|
188
|
+
} | {
|
|
189
|
+
kind: "field";
|
|
190
|
+
field: string;
|
|
191
|
+
};
|
|
192
|
+
export interface ContentListSort {
|
|
193
|
+
key: ContentListSortKey;
|
|
194
|
+
direction: ContentListDirection;
|
|
195
|
+
/** "<key> <direction>": what a marker names, so a marker for another sort is ignored. */
|
|
196
|
+
canonical: string;
|
|
197
|
+
}
|
|
198
|
+
/** A field id's form (letters, digits, underscore, a letter first), at most 64 characters. */
|
|
199
|
+
export declare function isContentListFieldId(value: string): boolean;
|
|
200
|
+
/** D5: "<key>" or "<key> asc|desc". Null when it is anything else. */
|
|
201
|
+
export declare function parseContentListSort(raw: string | undefined): ContentListSort | null;
|
|
202
|
+
export type ContentListCursorValue = string | number | null;
|
|
203
|
+
export interface ContentListCursor {
|
|
204
|
+
sort: string;
|
|
205
|
+
value: ContentListCursorValue;
|
|
206
|
+
id: string;
|
|
207
|
+
}
|
|
208
|
+
/** D11: a non-empty string of at most 1024 base64url characters. One linear scan. */
|
|
209
|
+
export declare function isContentListMarker(raw: unknown): raw is string;
|
|
210
|
+
/** base64url of the UTF-8 JSON `[sort, value, id]`, without padding. */
|
|
211
|
+
export declare function encodeContentListCursor(cursor: ContentListCursor): string;
|
|
212
|
+
/** The marker's tuple, or null for anything that is not one this code minted the shape of. */
|
|
213
|
+
export declare function decodeContentListCursor(raw: unknown): ContentListCursor | null;
|