@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,215 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const MCP_AUTH_PATHS: {
|
|
3
|
+
readonly register: "/api/mcp-auth/register";
|
|
4
|
+
readonly authorize: "/api/mcp-auth/authorize";
|
|
5
|
+
readonly token: "/api/mcp-auth/token";
|
|
6
|
+
readonly revoke: "/api/mcp-auth/revoke";
|
|
7
|
+
};
|
|
8
|
+
/** RFC 9728: the protected resource document of /api/mcp, at the path-aware well-known address. */
|
|
9
|
+
export declare const MCP_PROTECTED_RESOURCE_PATH = "/.well-known/oauth-protected-resource/api/mcp";
|
|
10
|
+
/** RFC 8414: the authorization server document of the issuer <base>. */
|
|
11
|
+
export declare const MCP_AUTHORIZATION_SERVER_PATH = "/.well-known/oauth-authorization-server";
|
|
12
|
+
export declare const AI_CLIENT_NAME_MAX = 100;
|
|
13
|
+
export declare const AI_REDIRECT_URIS_MAX = 5;
|
|
14
|
+
export declare const AI_REDIRECT_URI_MAX_CHARS = 2000;
|
|
15
|
+
export declare const AI_STATE_MAX_CHARS = 2048;
|
|
16
|
+
export declare const AI_RESOURCE_MAX_CHARS = 2048;
|
|
17
|
+
/** D2: an access token is a key that expires an hour after it is minted or rotated. */
|
|
18
|
+
export declare const AI_ACCESS_TOKEN_TTL_SECONDS = 3600;
|
|
19
|
+
/** D1: a pending request, and the code minted from it, live ten minutes. */
|
|
20
|
+
export declare const AI_AUTH_REQUEST_TTL_SECONDS = 600;
|
|
21
|
+
/** D5: a registered client no connection uses is swept after this long. */
|
|
22
|
+
export declare const AI_CLIENT_UNUSED_HOURS = 24;
|
|
23
|
+
export declare const AI_CONNECTION_NAME_MAX = 100;
|
|
24
|
+
export declare const AI_CONNECTION_IDLE_DAYS_DEFAULT = 30;
|
|
25
|
+
export declare const AI_CONNECTION_IDLE_DAYS_MAX = 365;
|
|
26
|
+
/** D4: what the connect screen says, and the pending and approval routes answer, for a request it cannot use. */
|
|
27
|
+
export declare const AI_CONNECTION_EXPIRED_MESSAGE = "This sign-in request has expired. Start again from the app.";
|
|
28
|
+
/** D5: the live setting aiConnectionIdleDays. */
|
|
29
|
+
export declare const AiConnectionIdleDaysSchema: z.ZodNumber;
|
|
30
|
+
export declare const AI_GRANT_TYPES: readonly ["authorization_code", "refresh_token"];
|
|
31
|
+
export declare const AI_OAUTH_ERRORS: readonly ["invalid_request", "invalid_client", "invalid_grant", "unsupported_grant_type", "invalid_target", "invalid_client_metadata", "access_denied", "unsupported_response_type"];
|
|
32
|
+
export type AiOAuthErrorCode = (typeof AI_OAUTH_ERRORS)[number];
|
|
33
|
+
/** D9: RFC 6749's error body, the description in plain English, never a code or a token. */
|
|
34
|
+
export declare const AiOAuthErrorSchema: z.ZodObject<{
|
|
35
|
+
error: z.ZodEnum<{
|
|
36
|
+
invalid_request: "invalid_request";
|
|
37
|
+
invalid_client: "invalid_client";
|
|
38
|
+
invalid_grant: "invalid_grant";
|
|
39
|
+
unsupported_grant_type: "unsupported_grant_type";
|
|
40
|
+
invalid_target: "invalid_target";
|
|
41
|
+
invalid_client_metadata: "invalid_client_metadata";
|
|
42
|
+
access_denied: "access_denied";
|
|
43
|
+
unsupported_response_type: "unsupported_response_type";
|
|
44
|
+
}>;
|
|
45
|
+
error_description: z.ZodString;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
/** RFC 7591: what a host sends to register. Unknown fields are dropped; the route checks the rest. */
|
|
48
|
+
export declare const AiClientRegistrationRequestSchema: z.ZodObject<{
|
|
49
|
+
redirect_uris: z.ZodArray<z.ZodString>;
|
|
50
|
+
client_name: z.ZodOptional<z.ZodString>;
|
|
51
|
+
token_endpoint_auth_method: z.ZodOptional<z.ZodString>;
|
|
52
|
+
grant_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
53
|
+
response_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export type AiClientRegistrationRequest = z.infer<typeof AiClientRegistrationRequestSchema>;
|
|
57
|
+
export declare const AiClientRegistrationResponseSchema: z.ZodObject<{
|
|
58
|
+
client_id: z.ZodString;
|
|
59
|
+
client_id_issued_at: z.ZodNumber;
|
|
60
|
+
client_name: z.ZodString;
|
|
61
|
+
redirect_uris: z.ZodArray<z.ZodString>;
|
|
62
|
+
token_endpoint_auth_method: z.ZodLiteral<"none">;
|
|
63
|
+
grant_types: z.ZodArray<z.ZodEnum<{
|
|
64
|
+
authorization_code: "authorization_code";
|
|
65
|
+
refresh_token: "refresh_token";
|
|
66
|
+
}>>;
|
|
67
|
+
response_types: z.ZodArray<z.ZodLiteral<"code">>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type AiClientRegistrationResponse = z.infer<typeof AiClientRegistrationResponseSchema>;
|
|
70
|
+
/** The authorize query: each parameter one string at most (a repeated one arrives as an array and fails). */
|
|
71
|
+
export declare const AiAuthorizeQuerySchema: z.ZodObject<{
|
|
72
|
+
response_type: z.ZodOptional<z.ZodString>;
|
|
73
|
+
client_id: z.ZodOptional<z.ZodString>;
|
|
74
|
+
redirect_uri: z.ZodOptional<z.ZodString>;
|
|
75
|
+
code_challenge: z.ZodOptional<z.ZodString>;
|
|
76
|
+
code_challenge_method: z.ZodOptional<z.ZodString>;
|
|
77
|
+
state: z.ZodOptional<z.ZodString>;
|
|
78
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
79
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export type AiAuthorizeQuery = z.infer<typeof AiAuthorizeQuerySchema>;
|
|
82
|
+
export declare const AiCodeGrantRequestSchema: z.ZodObject<{
|
|
83
|
+
grant_type: z.ZodLiteral<"authorization_code">;
|
|
84
|
+
code: z.ZodString;
|
|
85
|
+
client_id: z.ZodString;
|
|
86
|
+
redirect_uri: z.ZodString;
|
|
87
|
+
code_verifier: z.ZodString;
|
|
88
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
export type AiCodeGrantRequest = z.infer<typeof AiCodeGrantRequestSchema>;
|
|
91
|
+
export declare const AiRefreshGrantRequestSchema: z.ZodObject<{
|
|
92
|
+
grant_type: z.ZodLiteral<"refresh_token">;
|
|
93
|
+
refresh_token: z.ZodString;
|
|
94
|
+
client_id: z.ZodString;
|
|
95
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
96
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
export type AiRefreshGrantRequest = z.infer<typeof AiRefreshGrantRequestSchema>;
|
|
99
|
+
export declare const AiTokenResponseSchema: z.ZodObject<{
|
|
100
|
+
access_token: z.ZodString;
|
|
101
|
+
token_type: z.ZodLiteral<"Bearer">;
|
|
102
|
+
expires_in: z.ZodNumber;
|
|
103
|
+
refresh_token: z.ZodString;
|
|
104
|
+
scope: z.ZodString;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export type AiTokenResponse = z.infer<typeof AiTokenResponseSchema>;
|
|
107
|
+
/** RFC 7009. A public client names itself with client_id. */
|
|
108
|
+
export declare const AiRevokeRequestSchema: z.ZodObject<{
|
|
109
|
+
token: z.ZodString;
|
|
110
|
+
token_type_hint: z.ZodOptional<z.ZodString>;
|
|
111
|
+
client_id: z.ZodString;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
export type AiRevokeRequest = z.infer<typeof AiRevokeRequestSchema>;
|
|
114
|
+
/** RFC 7009 2.2: the answer is 200 with an empty body, whatever the token was. */
|
|
115
|
+
export declare const AiRevokeResponseSchema: z.ZodObject<{}, z.core.$strip>;
|
|
116
|
+
export declare const AiProtectedResourceMetadataSchema: z.ZodObject<{
|
|
117
|
+
resource: z.ZodString;
|
|
118
|
+
authorization_servers: z.ZodArray<z.ZodString>;
|
|
119
|
+
bearer_methods_supported: z.ZodArray<z.ZodLiteral<"header">>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
export type AiProtectedResourceMetadata = z.infer<typeof AiProtectedResourceMetadataSchema>;
|
|
122
|
+
export declare const AiAuthorizationServerMetadataSchema: z.ZodObject<{
|
|
123
|
+
issuer: z.ZodString;
|
|
124
|
+
authorization_endpoint: z.ZodString;
|
|
125
|
+
token_endpoint: z.ZodString;
|
|
126
|
+
registration_endpoint: z.ZodString;
|
|
127
|
+
revocation_endpoint: z.ZodString;
|
|
128
|
+
response_types_supported: z.ZodArray<z.ZodLiteral<"code">>;
|
|
129
|
+
grant_types_supported: z.ZodArray<z.ZodEnum<{
|
|
130
|
+
authorization_code: "authorization_code";
|
|
131
|
+
refresh_token: "refresh_token";
|
|
132
|
+
}>>;
|
|
133
|
+
code_challenge_methods_supported: z.ZodArray<z.ZodLiteral<"S256">>;
|
|
134
|
+
token_endpoint_auth_methods_supported: z.ZodArray<z.ZodLiteral<"none">>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
export type AiAuthorizationServerMetadata = z.infer<typeof AiAuthorizationServerMetadataSchema>;
|
|
137
|
+
export declare const AiConnectionPendingParamsSchema: z.ZodObject<{
|
|
138
|
+
requestId: z.ZodString;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
/** D4: what the connect screen shows. `actions` are the person's own (never managementApi.use); `suggested` are the ids ticked first. */
|
|
141
|
+
export declare const AiConnectionPendingResponseSchema: z.ZodObject<{
|
|
142
|
+
requestId: z.ZodString;
|
|
143
|
+
clientName: z.ZodString;
|
|
144
|
+
redirectHost: z.ZodString;
|
|
145
|
+
expiresAt: z.ZodString;
|
|
146
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
label: z.ZodString;
|
|
149
|
+
source: z.ZodString;
|
|
150
|
+
sourceLabel: z.ZodString;
|
|
151
|
+
active: z.ZodBoolean;
|
|
152
|
+
keyNote: z.ZodNullable<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
suggested: z.ZodArray<z.ZodString>;
|
|
155
|
+
idleDays: z.ZodNumber;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export type AiConnectionPendingResponse = z.infer<typeof AiConnectionPendingResponseSchema>;
|
|
158
|
+
export declare const AiConnectionApprovalRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
159
|
+
decision: z.ZodLiteral<"approve">;
|
|
160
|
+
requestId: z.ZodString;
|
|
161
|
+
name: z.ZodString;
|
|
162
|
+
actions: z.ZodArray<z.ZodString>;
|
|
163
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
164
|
+
decision: z.ZodLiteral<"deny">;
|
|
165
|
+
requestId: z.ZodString;
|
|
166
|
+
}, z.core.$strict>], "decision">;
|
|
167
|
+
export type AiConnectionApprovalRequest = z.infer<typeof AiConnectionApprovalRequestSchema>;
|
|
168
|
+
/** The address the screen sends the browser to: the app's, with the code or the error and the state. */
|
|
169
|
+
export declare const AiConnectionApprovalResponseSchema: z.ZodObject<{
|
|
170
|
+
redirectTo: z.ZodString;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
export type AiConnectionApprovalResponse = z.infer<typeof AiConnectionApprovalResponseSchema>;
|
|
173
|
+
export declare const AiConnectionSummarySchema: z.ZodObject<{
|
|
174
|
+
id: z.ZodString;
|
|
175
|
+
name: z.ZodString;
|
|
176
|
+
clientName: z.ZodString;
|
|
177
|
+
redirectHost: z.ZodString;
|
|
178
|
+
actions: z.ZodArray<z.ZodString>;
|
|
179
|
+
createdAt: z.ZodString;
|
|
180
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
181
|
+
ownerId: z.ZodString;
|
|
182
|
+
ownerName: z.ZodNullable<z.ZodString>;
|
|
183
|
+
own: z.ZodBoolean;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
export type AiConnectionSummary = z.infer<typeof AiConnectionSummarySchema>;
|
|
186
|
+
export declare const AiConnectionListQuerySchema: z.ZodObject<{
|
|
187
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
188
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
export type AiConnectionListQuery = z.infer<typeof AiConnectionListQuerySchema>;
|
|
191
|
+
export declare const AiConnectionListResponseSchema: z.ZodObject<{
|
|
192
|
+
items: z.ZodArray<z.ZodObject<{
|
|
193
|
+
id: z.ZodString;
|
|
194
|
+
name: z.ZodString;
|
|
195
|
+
clientName: z.ZodString;
|
|
196
|
+
redirectHost: z.ZodString;
|
|
197
|
+
actions: z.ZodArray<z.ZodString>;
|
|
198
|
+
createdAt: z.ZodString;
|
|
199
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
200
|
+
ownerId: z.ZodString;
|
|
201
|
+
ownerName: z.ZodNullable<z.ZodString>;
|
|
202
|
+
own: z.ZodBoolean;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
205
|
+
idleDays: z.ZodNumber;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
export type AiConnectionListResponse = z.infer<typeof AiConnectionListResponseSchema>;
|
|
208
|
+
export declare const AiConnectionParamsSchema: z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
export declare const RevokeAiConnectionResponseSchema: z.ZodObject<{
|
|
212
|
+
id: z.ZodString;
|
|
213
|
+
revoked: z.ZodLiteral<true>;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
export type RevokeAiConnectionResponse = z.infer<typeof RevokeAiConnectionResponseSchema>;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ActionStringSchema } from "./action.schema.js";
|
|
3
|
+
import { API_KEY_MAX_ACTIONS } from "./api-key-api.schema.js";
|
|
4
|
+
import { ActionSummarySchema } from "./role.schema.js";
|
|
5
|
+
// M31.5 C (D1 to D7): sign-in for an MCP host that has a URL field and no key field. The
|
|
6
|
+
// Kardalum server is the authorization server and the resource server at once: the host
|
|
7
|
+
// registers (RFC 7591), the person approves on the admin's connect screen, the host
|
|
8
|
+
// exchanges the code with PKCE S256 for a vk_ key that lives an hour and a refresh token.
|
|
9
|
+
// Every value is capped by length here, before a route reads it; the routes answer OAuth's
|
|
10
|
+
// own error bodies, so they parse with safeParse rather than a route schema.
|
|
11
|
+
export const MCP_AUTH_PATHS = {
|
|
12
|
+
register: "/api/mcp-auth/register",
|
|
13
|
+
authorize: "/api/mcp-auth/authorize",
|
|
14
|
+
token: "/api/mcp-auth/token",
|
|
15
|
+
revoke: "/api/mcp-auth/revoke",
|
|
16
|
+
};
|
|
17
|
+
/** RFC 9728: the protected resource document of /api/mcp, at the path-aware well-known address. */
|
|
18
|
+
export const MCP_PROTECTED_RESOURCE_PATH = "/.well-known/oauth-protected-resource/api/mcp";
|
|
19
|
+
/** RFC 8414: the authorization server document of the issuer <base>. */
|
|
20
|
+
export const MCP_AUTHORIZATION_SERVER_PATH = "/.well-known/oauth-authorization-server";
|
|
21
|
+
export const AI_CLIENT_NAME_MAX = 100;
|
|
22
|
+
export const AI_REDIRECT_URIS_MAX = 5;
|
|
23
|
+
export const AI_REDIRECT_URI_MAX_CHARS = 2_000;
|
|
24
|
+
export const AI_STATE_MAX_CHARS = 2_048;
|
|
25
|
+
export const AI_RESOURCE_MAX_CHARS = 2_048;
|
|
26
|
+
/** D2: an access token is a key that expires an hour after it is minted or rotated. */
|
|
27
|
+
export const AI_ACCESS_TOKEN_TTL_SECONDS = 3_600;
|
|
28
|
+
/** D1: a pending request, and the code minted from it, live ten minutes. */
|
|
29
|
+
export const AI_AUTH_REQUEST_TTL_SECONDS = 600;
|
|
30
|
+
/** D5: a registered client no connection uses is swept after this long. */
|
|
31
|
+
export const AI_CLIENT_UNUSED_HOURS = 24;
|
|
32
|
+
export const AI_CONNECTION_NAME_MAX = 100;
|
|
33
|
+
export const AI_CONNECTION_IDLE_DAYS_DEFAULT = 30;
|
|
34
|
+
export const AI_CONNECTION_IDLE_DAYS_MAX = 365;
|
|
35
|
+
/** D4: what the connect screen says, and the pending and approval routes answer, for a request it cannot use. */
|
|
36
|
+
export const AI_CONNECTION_EXPIRED_MESSAGE = "This sign-in request has expired. Start again from the app.";
|
|
37
|
+
/** D5: the live setting aiConnectionIdleDays. */
|
|
38
|
+
export const AiConnectionIdleDaysSchema = z.number().int().min(1).max(AI_CONNECTION_IDLE_DAYS_MAX);
|
|
39
|
+
export const AI_GRANT_TYPES = ["authorization_code", "refresh_token"];
|
|
40
|
+
export const AI_OAUTH_ERRORS = [
|
|
41
|
+
"invalid_request",
|
|
42
|
+
"invalid_client",
|
|
43
|
+
"invalid_grant",
|
|
44
|
+
"unsupported_grant_type",
|
|
45
|
+
"invalid_target",
|
|
46
|
+
"invalid_client_metadata",
|
|
47
|
+
"access_denied",
|
|
48
|
+
"unsupported_response_type",
|
|
49
|
+
];
|
|
50
|
+
/** D9: RFC 6749's error body, the description in plain English, never a code or a token. */
|
|
51
|
+
export const AiOAuthErrorSchema = z.object({ error: z.enum(AI_OAUTH_ERRORS), error_description: z.string() });
|
|
52
|
+
/** RFC 7591: what a host sends to register. Unknown fields are dropped; the route checks the rest. */
|
|
53
|
+
export const AiClientRegistrationRequestSchema = z.object({
|
|
54
|
+
redirect_uris: z.array(z.string().max(AI_REDIRECT_URI_MAX_CHARS)).min(1).max(AI_REDIRECT_URIS_MAX),
|
|
55
|
+
client_name: z.string().max(1_000).optional(),
|
|
56
|
+
token_endpoint_auth_method: z.string().max(64).optional(),
|
|
57
|
+
grant_types: z.array(z.string().max(64)).max(10).optional(),
|
|
58
|
+
response_types: z.array(z.string().max(64)).max(10).optional(),
|
|
59
|
+
scope: z.string().max(2_000).optional(),
|
|
60
|
+
});
|
|
61
|
+
export const AiClientRegistrationResponseSchema = z.object({
|
|
62
|
+
client_id: z.string(),
|
|
63
|
+
client_id_issued_at: z.number().int(),
|
|
64
|
+
client_name: z.string(),
|
|
65
|
+
redirect_uris: z.array(z.string()),
|
|
66
|
+
token_endpoint_auth_method: z.literal("none"),
|
|
67
|
+
grant_types: z.array(z.enum(AI_GRANT_TYPES)),
|
|
68
|
+
response_types: z.array(z.literal("code")),
|
|
69
|
+
});
|
|
70
|
+
/** The authorize query: each parameter one string at most (a repeated one arrives as an array and fails). */
|
|
71
|
+
export const AiAuthorizeQuerySchema = z.object({
|
|
72
|
+
response_type: z.string().max(64).optional(),
|
|
73
|
+
client_id: z.string().max(64).optional(),
|
|
74
|
+
redirect_uri: z.string().max(AI_REDIRECT_URI_MAX_CHARS).optional(),
|
|
75
|
+
code_challenge: z.string().max(128).optional(),
|
|
76
|
+
code_challenge_method: z.string().max(16).optional(),
|
|
77
|
+
state: z.string().max(AI_STATE_MAX_CHARS).optional(),
|
|
78
|
+
resource: z.string().max(AI_RESOURCE_MAX_CHARS).optional(),
|
|
79
|
+
scope: z.string().max(2_000).optional(),
|
|
80
|
+
});
|
|
81
|
+
export const AiCodeGrantRequestSchema = z.object({
|
|
82
|
+
grant_type: z.literal("authorization_code"),
|
|
83
|
+
code: z.string().min(1).max(256),
|
|
84
|
+
client_id: z.string().min(1).max(64),
|
|
85
|
+
redirect_uri: z.string().min(1).max(AI_REDIRECT_URI_MAX_CHARS),
|
|
86
|
+
code_verifier: z.string().min(43).max(128),
|
|
87
|
+
resource: z.string().max(AI_RESOURCE_MAX_CHARS).optional(),
|
|
88
|
+
});
|
|
89
|
+
export const AiRefreshGrantRequestSchema = z.object({
|
|
90
|
+
grant_type: z.literal("refresh_token"),
|
|
91
|
+
refresh_token: z.string().min(1).max(256),
|
|
92
|
+
client_id: z.string().min(1).max(64),
|
|
93
|
+
resource: z.string().max(AI_RESOURCE_MAX_CHARS).optional(),
|
|
94
|
+
scope: z.string().max(2_000).optional(),
|
|
95
|
+
});
|
|
96
|
+
export const AiTokenResponseSchema = z.object({
|
|
97
|
+
access_token: z.string(),
|
|
98
|
+
token_type: z.literal("Bearer"),
|
|
99
|
+
expires_in: z.number().int(),
|
|
100
|
+
refresh_token: z.string(),
|
|
101
|
+
/** The connection's actions, without managementApi.use, sorted and joined by spaces. */
|
|
102
|
+
scope: z.string(),
|
|
103
|
+
});
|
|
104
|
+
/** RFC 7009. A public client names itself with client_id. */
|
|
105
|
+
export const AiRevokeRequestSchema = z.object({
|
|
106
|
+
token: z.string().min(1).max(256),
|
|
107
|
+
token_type_hint: z.string().max(64).optional(),
|
|
108
|
+
client_id: z.string().min(1).max(64),
|
|
109
|
+
});
|
|
110
|
+
/** RFC 7009 2.2: the answer is 200 with an empty body, whatever the token was. */
|
|
111
|
+
export const AiRevokeResponseSchema = z.object({});
|
|
112
|
+
export const AiProtectedResourceMetadataSchema = z.object({
|
|
113
|
+
resource: z.string(),
|
|
114
|
+
authorization_servers: z.array(z.string()),
|
|
115
|
+
bearer_methods_supported: z.array(z.literal("header")),
|
|
116
|
+
});
|
|
117
|
+
export const AiAuthorizationServerMetadataSchema = z.object({
|
|
118
|
+
issuer: z.string(),
|
|
119
|
+
authorization_endpoint: z.string(),
|
|
120
|
+
token_endpoint: z.string(),
|
|
121
|
+
registration_endpoint: z.string(),
|
|
122
|
+
revocation_endpoint: z.string(),
|
|
123
|
+
response_types_supported: z.array(z.literal("code")),
|
|
124
|
+
grant_types_supported: z.array(z.enum(AI_GRANT_TYPES)),
|
|
125
|
+
code_challenge_methods_supported: z.array(z.literal("S256")),
|
|
126
|
+
token_endpoint_auth_methods_supported: z.array(z.literal("none")),
|
|
127
|
+
});
|
|
128
|
+
const RequestIdSchema = z.string().min(1).max(64);
|
|
129
|
+
export const AiConnectionPendingParamsSchema = z.object({ requestId: RequestIdSchema });
|
|
130
|
+
/** D4: what the connect screen shows. `actions` are the person's own (never managementApi.use); `suggested` are the ids ticked first. */
|
|
131
|
+
export const AiConnectionPendingResponseSchema = z.object({
|
|
132
|
+
requestId: z.string(),
|
|
133
|
+
clientName: z.string(),
|
|
134
|
+
/** The host of the address the app receives the code at. */
|
|
135
|
+
redirectHost: z.string(),
|
|
136
|
+
expiresAt: z.string().datetime(),
|
|
137
|
+
actions: z.array(ActionSummarySchema),
|
|
138
|
+
suggested: z.array(ActionStringSchema),
|
|
139
|
+
idleDays: z.number().int(),
|
|
140
|
+
});
|
|
141
|
+
export const AiConnectionApprovalRequestSchema = z.discriminatedUnion("decision", [
|
|
142
|
+
z
|
|
143
|
+
.object({
|
|
144
|
+
decision: z.literal("approve"),
|
|
145
|
+
requestId: RequestIdSchema,
|
|
146
|
+
name: z.string().min(1).max(AI_CONNECTION_NAME_MAX),
|
|
147
|
+
actions: z.array(ActionStringSchema).min(1).max(API_KEY_MAX_ACTIONS),
|
|
148
|
+
})
|
|
149
|
+
.strict(),
|
|
150
|
+
z.object({ decision: z.literal("deny"), requestId: RequestIdSchema }).strict(),
|
|
151
|
+
]);
|
|
152
|
+
/** The address the screen sends the browser to: the app's, with the code or the error and the state. */
|
|
153
|
+
export const AiConnectionApprovalResponseSchema = z.object({ redirectTo: z.string() });
|
|
154
|
+
export const AiConnectionSummarySchema = z.object({
|
|
155
|
+
id: z.string().uuid(),
|
|
156
|
+
name: z.string(),
|
|
157
|
+
clientName: z.string(),
|
|
158
|
+
redirectHost: z.string(),
|
|
159
|
+
/** The key's actions without managementApi.use, sorted. */
|
|
160
|
+
actions: z.array(z.string()),
|
|
161
|
+
createdAt: z.string().datetime(),
|
|
162
|
+
lastUsedAt: z.string().datetime().nullable(),
|
|
163
|
+
ownerId: z.string().uuid(),
|
|
164
|
+
/** The approving person's name only, never the email (the key list's rule). */
|
|
165
|
+
ownerName: z.string().nullable(),
|
|
166
|
+
/** True for the signed-in person's own connection. */
|
|
167
|
+
own: z.boolean(),
|
|
168
|
+
});
|
|
169
|
+
export const AiConnectionListQuerySchema = z.object({
|
|
170
|
+
cursor: z.string().uuid().optional(),
|
|
171
|
+
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
172
|
+
});
|
|
173
|
+
export const AiConnectionListResponseSchema = z.object({
|
|
174
|
+
items: z.array(AiConnectionSummarySchema),
|
|
175
|
+
nextCursor: z.string().uuid().nullable(),
|
|
176
|
+
idleDays: z.number().int(),
|
|
177
|
+
});
|
|
178
|
+
export const AiConnectionParamsSchema = z.object({ id: z.string().uuid() });
|
|
179
|
+
export const RevokeAiConnectionResponseSchema = z.object({ id: z.string().uuid(), revoked: z.literal(true) });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const AI_CONTEXT_MAX_CHARS = 20000;
|
|
3
|
+
export declare const AiContextSchema: z.ZodString;
|
|
4
|
+
export declare const AiContextResponseSchema: z.ZodObject<{
|
|
5
|
+
text: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type AiContextResponse = z.infer<typeof AiContextResponseSchema>;
|
|
8
|
+
/** M31.5 B (D8): the body of PUT /api/manage/v1/settings/ai-context. */
|
|
9
|
+
export declare const UpdateAiContextRequestSchema: z.ZodObject<{
|
|
10
|
+
text: z.ZodString;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export type UpdateAiContextRequest = z.infer<typeof UpdateAiContextRequestSchema>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// M31.5 A (D6): the site owner's words for an AI assistant (who the site is for,
|
|
3
|
+
// tone, spelling, conventions), at most 20,000 characters. Stored as the Setting row
|
|
4
|
+
// keyed aiContext; read by GET /api/manage/v1/settings/ai-context (settings.read).
|
|
5
|
+
// PUT /api/manage/v1/settings/ai-context writes it (settings.update, a session only); an empty text clears it.
|
|
6
|
+
export const AI_CONTEXT_MAX_CHARS = 20_000;
|
|
7
|
+
export const AiContextSchema = z.string().max(AI_CONTEXT_MAX_CHARS);
|
|
8
|
+
export const AiContextResponseSchema = z.object({ text: AiContextSchema });
|
|
9
|
+
/** M31.5 B (D8): the body of PUT /api/manage/v1/settings/ai-context. */
|
|
10
|
+
export const UpdateAiContextRequestSchema = z.object({ text: AiContextSchema }).strict();
|
|
@@ -14,6 +14,11 @@ export type ApiKeySummary = z.infer<typeof ApiKeySummarySchema>;
|
|
|
14
14
|
export declare const ApiKeyListQuerySchema: z.ZodObject<{
|
|
15
15
|
cursor: z.ZodOptional<z.ZodString>;
|
|
16
16
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
17
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
18
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
live: "live";
|
|
20
|
+
revoked: "revoked";
|
|
21
|
+
}>>;
|
|
17
22
|
}, z.core.$strip>;
|
|
18
23
|
export type ApiKeyListQuery = z.infer<typeof ApiKeyListQuerySchema>;
|
|
19
24
|
export declare const ApiKeyListResponseSchema: z.ZodObject<{
|
|
@@ -87,6 +92,11 @@ export declare const API_KEY_PRESETS: readonly [{
|
|
|
87
92
|
readonly actions: readonly ["content.read", "media.read", "documentTypes.read", "templates.read", "sites.read", "content.create", "content.update", "content.publish", "content.delete", "media.create", "media.update", "media.delete"];
|
|
88
93
|
}];
|
|
89
94
|
export type ApiKeyPresetId = (typeof API_KEY_PRESETS)[number]["id"];
|
|
95
|
+
export declare const DeleteApiKeyResponseSchema: z.ZodObject<{
|
|
96
|
+
deleted: z.ZodLiteral<true>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
export type DeleteApiKeyResponse = z.infer<typeof DeleteApiKeyResponseSchema>;
|
|
99
|
+
export declare const API_KEY_LIVE_DELETE_MESSAGE = "Revoke the key before removing it";
|
|
90
100
|
export declare const ApiKeyParamsSchema: z.ZodObject<{
|
|
91
101
|
id: z.ZodString;
|
|
92
102
|
}, z.core.$strip>;
|
|
@@ -29,6 +29,9 @@ export const ApiKeySummarySchema = z.object({
|
|
|
29
29
|
export const ApiKeyListQuerySchema = z.object({
|
|
30
30
|
cursor: z.string().uuid().optional(),
|
|
31
31
|
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
32
|
+
// M32 I (R4, R9): only the keys one person made, and only live or revoked ones.
|
|
33
|
+
createdBy: z.string().uuid().optional(),
|
|
34
|
+
state: z.enum(["live", "revoked"]).optional(),
|
|
32
35
|
});
|
|
33
36
|
export const ApiKeyListResponseSchema = z.object({
|
|
34
37
|
items: z.array(ApiKeySummarySchema),
|
|
@@ -85,4 +88,6 @@ export const API_KEY_PRESETS = [
|
|
|
85
88
|
{ id: "readWrite", actions: [...READ_ACTIONS, ...WRITE_ACTIONS] },
|
|
86
89
|
];
|
|
87
90
|
// S301: the params of POST /api-keys/:id/revoke, moved here from the route file.
|
|
91
|
+
export const DeleteApiKeyResponseSchema = z.object({ deleted: z.literal(true) });
|
|
92
|
+
export const API_KEY_LIVE_DELETE_MESSAGE = "Revoke the key before removing it";
|
|
88
93
|
export const ApiKeyParamsSchema = z.object({ id: z.string().uuid() });
|
|
@@ -11,9 +11,10 @@ export declare const AUDIT_REQUEST_ID_MAX = 64;
|
|
|
11
11
|
export declare const AUDIT_SUMMARY_MAX_BYTES = 2048;
|
|
12
12
|
/** A month as an entry's `period` and the export's query spell it: `2026-10`. */
|
|
13
13
|
export declare const AUDIT_PERIOD_PATTERN: RegExp;
|
|
14
|
-
/** Who made the request: a signed-in person, an API key, the site's own server code (the in-process handle), or nobody verified. */
|
|
14
|
+
/** Who made the request: a signed-in person, an API key, the site's own server code (the in-process handle), a plugin acting as itself, or nobody verified. */
|
|
15
15
|
export declare const AuditActorKindSchema: z.ZodEnum<{
|
|
16
16
|
key: "key";
|
|
17
|
+
plugin: "plugin";
|
|
17
18
|
session: "session";
|
|
18
19
|
site: "site";
|
|
19
20
|
anonymous: "anonymous";
|
|
@@ -36,6 +37,7 @@ export declare const AuditEntrySchema: z.ZodObject<{
|
|
|
36
37
|
requestId: z.ZodString;
|
|
37
38
|
actorKind: z.ZodEnum<{
|
|
38
39
|
key: "key";
|
|
40
|
+
plugin: "plugin";
|
|
39
41
|
session: "session";
|
|
40
42
|
site: "site";
|
|
41
43
|
anonymous: "anonymous";
|
|
@@ -49,6 +51,7 @@ export declare const AuditEntrySchema: z.ZodObject<{
|
|
|
49
51
|
keyOwnerId: z.ZodNullable<z.ZodString>;
|
|
50
52
|
keyOwnerName: z.ZodNullable<z.ZodString>;
|
|
51
53
|
keyOwnerEmail: z.ZodNullable<z.ZodString>;
|
|
54
|
+
pluginId: z.ZodNullable<z.ZodString>;
|
|
52
55
|
ip: z.ZodString;
|
|
53
56
|
method: z.ZodString;
|
|
54
57
|
route: z.ZodString;
|
|
@@ -66,6 +69,7 @@ export declare const AuditListQuerySchema: z.ZodObject<{
|
|
|
66
69
|
to: z.ZodOptional<z.ZodString>;
|
|
67
70
|
actorKind: z.ZodOptional<z.ZodEnum<{
|
|
68
71
|
key: "key";
|
|
72
|
+
plugin: "plugin";
|
|
69
73
|
session: "session";
|
|
70
74
|
site: "site";
|
|
71
75
|
anonymous: "anonymous";
|
|
@@ -95,6 +99,7 @@ export declare const AuditListResponseSchema: z.ZodObject<{
|
|
|
95
99
|
requestId: z.ZodString;
|
|
96
100
|
actorKind: z.ZodEnum<{
|
|
97
101
|
key: "key";
|
|
102
|
+
plugin: "plugin";
|
|
98
103
|
session: "session";
|
|
99
104
|
site: "site";
|
|
100
105
|
anonymous: "anonymous";
|
|
@@ -108,6 +113,7 @@ export declare const AuditListResponseSchema: z.ZodObject<{
|
|
|
108
113
|
keyOwnerId: z.ZodNullable<z.ZodString>;
|
|
109
114
|
keyOwnerName: z.ZodNullable<z.ZodString>;
|
|
110
115
|
keyOwnerEmail: z.ZodNullable<z.ZodString>;
|
|
116
|
+
pluginId: z.ZodNullable<z.ZodString>;
|
|
111
117
|
ip: z.ZodString;
|
|
112
118
|
method: z.ZodString;
|
|
113
119
|
route: z.ZodString;
|
|
@@ -18,8 +18,8 @@ export const AUDIT_REQUEST_ID_MAX = 64;
|
|
|
18
18
|
export const AUDIT_SUMMARY_MAX_BYTES = 2048;
|
|
19
19
|
/** A month as an entry's `period` and the export's query spell it: `2026-10`. */
|
|
20
20
|
export const AUDIT_PERIOD_PATTERN = /^\d{4}-(0[1-9]|1[0-2])$/;
|
|
21
|
-
/** Who made the request: a signed-in person, an API key, the site's own server code (the in-process handle), or nobody verified. */
|
|
22
|
-
export const AuditActorKindSchema = z.enum(["session", "key", "site", "anonymous"]);
|
|
21
|
+
/** Who made the request: a signed-in person, an API key, the site's own server code (the in-process handle), a plugin acting as itself, or nobody verified. */
|
|
22
|
+
export const AuditActorKindSchema = z.enum(["session", "key", "site", "anonymous", "plugin"]);
|
|
23
23
|
/** How a request ended, by its status: success below 400, refused from 400 to 499, failed from 500. */
|
|
24
24
|
export const AuditOutcomeSchema = z.enum(["success", "refused", "failed"]);
|
|
25
25
|
/** One value of a summary: plain values and lists of strings only, so a request body can never ride along. */
|
|
@@ -45,6 +45,8 @@ export const AuditEntrySchema = z.object({
|
|
|
45
45
|
keyOwnerId: z.string().nullable(),
|
|
46
46
|
keyOwnerName: z.string().nullable(),
|
|
47
47
|
keyOwnerEmail: z.string().nullable(),
|
|
48
|
+
// The plugin a `plugin` actor acted as, kept as a value; null for every other actor.
|
|
49
|
+
pluginId: z.string().nullable(),
|
|
48
50
|
// The caller's address as the server resolved it: KARDALUM_TRUST_PROXY decides whether a proxy's header counts.
|
|
49
51
|
ip: z.string(),
|
|
50
52
|
method: z.string(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BUILT_IN_EDITOR_IDS: readonly string[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// S314o3 (D1): the ids of the built-in editors, as plain data the server can read without the
|
|
2
|
+
// React registry in built-ins.tsx. A plugin may not contribute an editor under one of these ids:
|
|
3
|
+
// the install refuses it, because the admin would refuse to register it and the server would
|
|
4
|
+
// validate the field by the built-in's rules. The SDK's built-ins.test.tsx holds this list to what
|
|
5
|
+
// built-ins.tsx registers.
|
|
6
|
+
// M32 J (J2): the list moved here from the SDK so the delivery checks can read it too (the rule
|
|
7
|
+
// for a plugin's declared data types names a built-in editor by its id). The SDK re-exports it.
|
|
8
|
+
export const BUILT_IN_EDITOR_IDS = [
|
|
9
|
+
"com.kardalum.text",
|
|
10
|
+
"com.kardalum.number",
|
|
11
|
+
"com.kardalum.boolean",
|
|
12
|
+
"com.kardalum.date",
|
|
13
|
+
"com.kardalum.image",
|
|
14
|
+
"com.kardalum.fileupload",
|
|
15
|
+
"com.kardalum.richtext",
|
|
16
|
+
"com.kardalum.html",
|
|
17
|
+
"com.kardalum.daterange",
|
|
18
|
+
"com.kardalum.contentlist",
|
|
19
|
+
"com.kardalum.crop",
|
|
20
|
+
"com.kardalum.thumbnail",
|
|
21
|
+
"com.kardalum.asset",
|
|
22
|
+
"com.kardalum.contentpicker",
|
|
23
|
+
"com.kardalum.options",
|
|
24
|
+
"com.kardalum.link",
|
|
25
|
+
"com.kardalum.group",
|
|
26
|
+
"com.kardalum.list",
|
|
27
|
+
];
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { SlotLabelMap } from "./plugin-labels.js";
|
|
3
|
+
/** The core's notes. The list only grows: an id is persisted on a
|
|
4
|
+
* marketplace version row and read by three surfaces, so a removed or
|
|
5
|
+
* renamed id is a data change, not a cosmetic one. */
|
|
6
|
+
export declare const CAPABILITY_NOTES: readonly ["rawBody", "identifiesPeople", "durable", "methods", "leavesServer", "setsTitle", "embedFrom", "embedKindMap", "embedKindContent", "privacyNoticeAt", "addsScript"];
|
|
7
|
+
export type CapabilityNote = (typeof CAPABILITY_NOTES)[number];
|
|
8
|
+
/** The longest value a note may carry (a method list, an origin, a host). */
|
|
9
|
+
export declare const CAPABILITY_NOTE_VALUE_MAX = 200;
|
|
10
|
+
export type CapabilityDetail = string | {
|
|
11
|
+
text: string | SlotLabelMap;
|
|
12
|
+
notes?: Array<CapabilityNote | {
|
|
13
|
+
id: CapabilityNote;
|
|
14
|
+
value: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
/** A detail as a response carries it (the marketplace's listing, which a
|
|
18
|
+
* CMS proxies): a note may be an id this build has no words for. A CMS and
|
|
19
|
+
* its marketplace deploy apart, so a newer marketplace's note reaches an
|
|
20
|
+
* older CMS as one id it prints generically (formatCapabilityDetail), never
|
|
21
|
+
* as a listing that fails to parse. What a plugin or the door declares stays
|
|
22
|
+
* CapabilityDetail, with the closed list. */
|
|
23
|
+
export type CapabilityDetailRead = string | {
|
|
24
|
+
text: string | SlotLabelMap;
|
|
25
|
+
notes?: Array<string | {
|
|
26
|
+
id: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
/** The longest note id a response may carry; the closed list's ids are far shorter. */
|
|
31
|
+
export declare const CAPABILITY_NOTE_ID_READ_MAX = 64;
|
|
32
|
+
/** Whether this build has words for a note id. */
|
|
33
|
+
export declare function isCapabilityNote(id: string): id is CapabilityNote;
|
|
34
|
+
/** A detail, as the derivation writes it and every stored listing and
|
|
35
|
+
* reference carries it. A plain string stays unbounded, as before K2; a
|
|
36
|
+
* text map follows the label map rule (`en` required); a note's value is
|
|
37
|
+
* shown as written, so it is a bounded text with no control character. */
|
|
38
|
+
export declare const CapabilityDetailSchema: z.ZodType<CapabilityDetail>;
|
|
39
|
+
/** A detail as a response carries it: every rule of CapabilityDetailSchema
|
|
40
|
+
* except the closed note list, so an unknown note is kept, not refused. M33
|
|
41
|
+
* part 1 fix wave (critic-2): not strict either, so a key a newer marketplace
|
|
42
|
+
* adds to a detail or a note is dropped, not refused. */
|
|
43
|
+
export declare const CapabilityDetailReadSchema: z.ZodType<CapabilityDetailRead>;
|
|
44
|
+
/** The longest generic line readCapabilityDetail makes of a shape it does not know. */
|
|
45
|
+
export declare const CAPABILITY_DETAIL_GENERIC_MAX = 200;
|
|
46
|
+
/** M33 part 1 fix wave (critic-2): any value a marketplace sends as a detail, as one this build
|
|
47
|
+
* reads. A known shape is read by CapabilityDetailReadSchema (unknown keys dropped); a note in a
|
|
48
|
+
* shape this build does not know is left out of an otherwise readable detail; any other shape is
|
|
49
|
+
* shown generically, as its JSON text cut to CAPABILITY_DETAIL_GENERIC_MAX characters, so drift is
|
|
50
|
+
* visible and never fails the listing. */
|
|
51
|
+
export declare function readCapabilityDetail(raw: unknown): CapabilityDetailRead;
|
|
52
|
+
/** The identifier a detail names, in the reader's language: a plain string
|
|
53
|
+
* as written, else its `text` (a map read as resolveLabel reads it). For a
|
|
54
|
+
* reader that takes the detail as a value, such as a vendor host. */
|
|
55
|
+
export declare function capabilityDetailText(detail: CapabilityDetailRead, language?: string): string;
|
|
56
|
+
/** One detail line as every reader prints it: a plain string as written; an
|
|
57
|
+
* object's text in the reader's language, then its notes in brackets, each
|
|
58
|
+
* in the words `noteWords` gives for it (the reader's own language, held
|
|
59
|
+
* where its capability names are held). A note's value is printed as
|
|
60
|
+
* written in place of its words' `{{value}}`; a detail with an empty text
|
|
61
|
+
* prints its notes alone; the result is text, never
|
|
62
|
+
* markup. A note with no value drops the slot. A note this build has no
|
|
63
|
+
* words for (a newer marketplace's) is printed as its id, then its value
|
|
64
|
+
* after a colon. */
|
|
65
|
+
export declare function formatCapabilityDetail(detail: CapabilityDetailRead, language: string, noteWords: (note: CapabilityNote) => string): string;
|