@kardalum/plugin-sdk 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +281 -0
- package/README.md +19 -0
- package/dist/admin-section-registry.d.ts +48 -1
- package/dist/admin-section-registry.js +90 -0
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +86 -0
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +38 -7
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +101 -4
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +22 -0
- package/dist/consent-entry.d.ts +11 -0
- package/dist/consent-entry.js +18 -0
- package/dist/content-library.d.ts +102 -0
- package/dist/content-library.js +15 -0
- package/dist/content-list-extensions.d.ts +50 -0
- package/dist/content-list-extensions.js +11 -0
- package/dist/content-picker/page-picker-sheet.d.ts +15 -0
- package/dist/content-picker/page-picker-sheet.js +105 -0
- package/dist/content-picker/page-picker.d.ts +18 -0
- package/dist/content-picker/page-picker.js +20 -0
- package/dist/content-picker/page-tree.d.ts +25 -0
- package/dist/content-picker/page-tree.js +132 -0
- package/dist/data-type-plugin.d.ts +7 -1
- package/dist/datatype-validation.d.ts +4 -9
- package/dist/datatype-validation.js +147 -1
- package/dist/datatypes-entry.d.ts +1 -0
- package/dist/datatypes-entry.js +2 -0
- package/dist/entitlement-entry.d.ts +1 -1
- package/dist/entitlement-entry.js +1 -1
- package/dist/entitlement-gate.d.ts +14 -0
- package/dist/entitlement-gate.js +64 -7
- package/dist/entitlement-plan.d.ts +6 -0
- package/dist/entitlement-plan.js +10 -0
- package/dist/entitlement-types.d.ts +53 -12
- package/dist/entitlement.d.ts +31 -4
- package/dist/entitlement.js +58 -17
- package/dist/hook-entry.d.ts +5 -0
- package/dist/hook-entry.js +30 -0
- package/dist/host-entry.d.ts +7 -1
- package/dist/host-entry.js +14 -1
- package/dist/index.d.ts +67 -7
- package/dist/index.js +94 -6
- package/dist/mail.d.ts +34 -0
- package/dist/mail.js +1 -0
- package/dist/manifest-entry.d.ts +47 -4
- package/dist/manifest-entry.js +63 -2
- package/dist/manifest-schema.d.ts +993 -40
- package/dist/manifest-schema.js +516 -26
- package/dist/manifest.d.ts +1186 -62
- package/dist/manifest.js +8 -4
- package/dist/media/media-picker.js +31 -18
- package/dist/media/upload-error.d.ts +5 -1
- package/dist/media/upload-error.js +14 -2
- package/dist/media-library.d.ts +32 -0
- package/dist/media-library.js +15 -0
- package/dist/nested-field-host.d.ts +76 -0
- package/dist/nested-field-host.js +90 -0
- package/dist/notify.d.ts +12 -4
- package/dist/notify.js +1 -1
- package/dist/outbound.d.ts +47 -0
- package/dist/outbound.js +1 -0
- package/dist/plugin-context.d.ts +52 -0
- package/dist/plugin-context.js +27 -0
- package/dist/plugin-permissions.d.ts +18 -0
- package/dist/plugin-permissions.js +25 -0
- package/dist/plugin-screen-context.d.ts +262 -9
- package/dist/plugin-screen-context.js +56 -0
- package/dist/providers.d.ts +313 -0
- package/dist/providers.js +74 -0
- package/dist/read-all-pages.d.ts +5 -0
- package/dist/read-all-pages.js +3 -2
- package/dist/render-page.d.ts +15 -0
- package/dist/render-page.js +20 -0
- package/dist/richtext/block-panel.d.ts +12 -1
- package/dist/richtext/block-panel.js +36 -25
- package/dist/richtext/button-view.d.ts +11 -0
- package/dist/richtext/button-view.js +45 -0
- package/dist/richtext/content-guard.d.ts +4 -0
- package/dist/richtext/content-guard.js +27 -0
- package/dist/richtext/editor-handle.d.ts +34 -0
- package/dist/richtext/editor-handle.js +225 -0
- package/dist/richtext/extensions.d.ts +6 -0
- package/dist/richtext/extensions.js +16 -0
- package/dist/richtext/insert-menu.d.ts +6 -1
- package/dist/richtext/insert-menu.js +45 -22
- package/dist/richtext/item-attributes.d.ts +6 -0
- package/dist/richtext/item-attributes.js +19 -0
- package/dist/richtext/item-panel.d.ts +25 -0
- package/dist/richtext/item-panel.js +118 -0
- package/dist/richtext/item-view.d.ts +58 -0
- package/dist/richtext/item-view.js +172 -0
- package/dist/richtext/mark-form.d.ts +10 -0
- package/dist/richtext/mark-form.js +38 -0
- package/dist/richtext/paste-choice.d.ts +9 -0
- package/dist/richtext/paste-choice.js +13 -0
- package/dist/richtext/plugin-items.d.ts +72 -0
- package/dist/richtext/plugin-items.js +562 -0
- package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
- package/dist/richtext/plugin-mark-tooltips.js +44 -0
- package/dist/richtext/plugin-toolbar.d.ts +57 -0
- package/dist/richtext/plugin-toolbar.js +186 -0
- package/dist/richtext/rich-item-icons.d.ts +5 -0
- package/dist/richtext/rich-item-icons.js +42 -0
- package/dist/richtext/rich-items.d.ts +42 -0
- package/dist/richtext/rich-items.js +68 -0
- package/dist/richtext/rich-text-view-host.d.ts +24 -0
- package/dist/richtext/rich-text-view-host.js +11 -0
- package/dist/richtext/style-listbox.js +6 -4
- package/dist/richtext/toolbar-button.d.ts +16 -0
- package/dist/richtext/toolbar-button.js +9 -0
- package/dist/richtext/url-paste.d.ts +20 -0
- package/dist/richtext/url-paste.js +82 -0
- package/dist/richtext-html-entry.d.ts +5 -0
- package/dist/richtext-html-entry.js +11 -0
- package/dist/sdk-strings.d.ts +344 -0
- package/dist/sdk-strings.js +411 -0
- package/dist/sealing.d.ts +14 -0
- package/dist/sealing.js +1 -0
- package/dist/service-contract.d.ts +17 -0
- package/dist/service-contract.js +39 -0
- package/dist/services.d.ts +114 -0
- package/dist/services.js +1 -0
- package/dist/simple-storage-value-provider.js +24 -24
- package/dist/structured-storage-types.d.ts +429 -9
- package/dist/tailwind.js +10 -5
- package/dist/template-reads.d.ts +16 -0
- package/dist/template-reads.js +21 -0
- package/dist/testing-entry.d.ts +38 -0
- package/dist/testing-entry.js +173 -0
- package/dist/text-entry.d.ts +1 -0
- package/dist/text-entry.js +7 -0
- package/dist/tokens/system-dark.css +1 -0
- package/dist/tokens/tailwind-theme.css +7 -0
- package/dist/tokens/tokens.css +19 -3
- package/dist/tokens/tokens.json +13 -4
- package/dist/uploads.d.ts +43 -0
- package/dist/uploads.js +1 -0
- package/dist/user-library.d.ts +51 -0
- package/dist/user-library.js +15 -0
- package/dist/view-helpers.d.ts +18 -0
- package/dist/view-helpers.js +64 -0
- package/dist/views/asset-view.js +4 -1
- package/dist/views/content-list-preview.js +3 -1
- package/dist/views/content-list-settings-view.js +11 -7
- package/dist/views/content-list-view.d.ts +5 -3
- package/dist/views/content-list-view.js +243 -40
- package/dist/views/content-picker-view.d.ts +3 -0
- package/dist/views/content-picker-view.js +143 -0
- package/dist/views/crop-view.d.ts +4 -6
- package/dist/views/crop-view.js +22 -13
- package/dist/views/date-range-view.js +4 -1
- package/dist/views/file-upload-view.d.ts +5 -7
- package/dist/views/file-upload-view.js +16 -7
- package/dist/views/group-view.d.ts +8 -0
- package/dist/views/group-view.js +123 -0
- package/dist/views/html-view.js +7 -6
- package/dist/views/image-view.js +37 -19
- package/dist/views/link-view.d.ts +3 -0
- package/dist/views/link-view.js +150 -0
- package/dist/views/options-list-view.d.ts +3 -0
- package/dist/views/options-list-view.js +104 -0
- package/dist/views/repeatable-list-view.d.ts +3 -0
- package/dist/views/repeatable-list-view.js +113 -0
- package/dist/views/rich-text-view.d.ts +2 -0
- package/dist/views/rich-text-view.js +208 -35
- package/dist/views/suggest-key.d.ts +17 -0
- package/dist/views/suggest-key.js +55 -0
- package/dist/views/unreadable-rich-text.d.ts +17 -0
- package/dist/views/unreadable-rich-text.js +40 -0
- package/dist/visitors.d.ts +81 -0
- package/dist/visitors.js +1 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +334 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +254 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +11 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +144 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +137 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +178 -2
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +55 -13
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +22 -10
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +257 -15
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +78 -5
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +90 -5
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +162 -48
- package/node_modules/@kardalum/api-schemas/dist/index.js +137 -30
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +226 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +409 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +490 -10
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +53 -3
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +38 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +60 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +333 -0
- package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
- package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +84 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +44 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +44 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +16 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +34 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +126 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +119 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +216 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +46 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +41 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +304 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +220 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +408 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +307 -23
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +23 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +61 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +23 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +37 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +346 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +461 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +352 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +409 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +347 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +976 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +47 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +307 -4
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +71 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +540 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +394 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +201 -1
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +97 -8
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +64 -1
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +53 -2
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +386 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +618 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +188 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +72 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +36 -3
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
- package/node_modules/@kardalum/api-schemas/package.json +2 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +15 -1
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +7 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +2 -1
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +19 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +18 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +13 -4
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +5 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +38 -2
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +17 -2
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +625 -35
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +25 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +47 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +40 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +76 -6
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +99 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +316 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +40 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +150 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +69 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +8 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +7 -1
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
- package/node_modules/@kardalum/plugin-package/package.json +4 -0
- package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
- package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/index.js +2 -0
- package/package.json +25 -3
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/** A contract name, method name, event name or refusal code: 1 to 40 characters. */
|
|
2
|
+
export declare const SERVICE_NAME_MAX = 40;
|
|
3
|
+
/** The most of each declaration one plugin makes. */
|
|
4
|
+
export declare const SERVICE_CONTRACTS_MAX = 10;
|
|
5
|
+
export declare const SERVICE_OFFERS_MAX = 20;
|
|
6
|
+
export declare const SERVICE_USES_MAX = 20;
|
|
7
|
+
export declare const PLUGIN_EVENTS_MAX = 20;
|
|
8
|
+
/** The most methods one contract declares, and refusal codes one method declares. */
|
|
9
|
+
export declare const SERVICE_METHODS_MAX = 16;
|
|
10
|
+
export declare const SERVICE_REFUSALS_MAX = 16;
|
|
11
|
+
/** The most personal output fields one contract declares across its methods: the install summary lists each. */
|
|
12
|
+
export declare const SERVICE_PERSONAL_OUTPUT_MAX = 256;
|
|
13
|
+
/** The most plugin events one plugin hooks: the install summary lists each. */
|
|
14
|
+
export declare const PLUGIN_EVENT_LISTENS_MAX = 64;
|
|
15
|
+
/** A method's time limit, in milliseconds: the owner's `timeMs`, at least the minimum, at most the mail sender's limit. */
|
|
16
|
+
export declare const SERVICE_CALL_TIME_MS_DEFAULT = 5000;
|
|
17
|
+
export declare const SERVICE_CALL_TIME_MS_MIN = 100;
|
|
18
|
+
export declare const SERVICE_CALL_TIME_MS_MAX = 30000;
|
|
19
|
+
/** The most calls running at once for one provider; a call past it answers `busy`. */
|
|
20
|
+
export declare const SERVICE_CALLS_RUNNING_MAX = 8;
|
|
21
|
+
/** A call still running after this long gives its slot back; it keeps running uncounted, as a hook's handler does. */
|
|
22
|
+
export declare const SERVICE_SLOT_RELEASE_MS = 30000;
|
|
23
|
+
/** The most calls in one chain (a consumer's call, a nested call, a call inside that). */
|
|
24
|
+
export declare const SERVICE_CALL_DEPTH_MAX = 3;
|
|
25
|
+
/** The most calls one connection makes in a minute; past it a call answers `tooMany`. */
|
|
26
|
+
export declare const SERVICE_CALLS_PER_MINUTE_MAX = 600;
|
|
27
|
+
/** The largest input and output, measured on their JSON in UTF-8 bytes. */
|
|
28
|
+
export declare const SERVICE_PAYLOAD_BYTES_MAX = 262144;
|
|
29
|
+
/** The largest plugin event payload, the most raises one plugin makes a minute, and the deepest raise chain. */
|
|
30
|
+
export declare const PLUGIN_EVENT_PAYLOAD_BYTES_MAX = 16384;
|
|
31
|
+
export declare const PLUGIN_EVENTS_PER_MINUTE_MAX = 600;
|
|
32
|
+
export declare const PLUGIN_EVENT_DEPTH_MAX = 3;
|
|
33
|
+
/** How long an instance trusts its read of the connection approvals; a revoke reaches every instance within it. */
|
|
34
|
+
export declare const SERVICE_GRANTS_MEMO_MS = 5000;
|
|
35
|
+
/** The largest major or minor part of a contract version. */
|
|
36
|
+
export declare const CONTRACT_VERSION_PART_MAX = 999;
|
|
37
|
+
/** Design 4.4: why a call answered no value. A closed list that only grows. */
|
|
38
|
+
export declare const SERVICE_FAILURE_REASONS: readonly ["missing", "off", "notGranted", "incompatible", "unlicensed", "ambiguous", "notImplemented", "busy", "timeout", "failed", "invalidAnswer", "refused", "loop", "tooMany"];
|
|
39
|
+
export type ServiceFailure = (typeof SERVICE_FAILURE_REASONS)[number];
|
|
40
|
+
/** Design 4.3: a provider's state as `context.services.list` answers it. */
|
|
41
|
+
export declare const SERVICE_PROVIDER_STATES: readonly ["ready", "off", "notGranted", "unlicensed", "incompatible"];
|
|
42
|
+
export type ServiceProviderState = (typeof SERVICE_PROVIDER_STATES)[number];
|
|
43
|
+
/** Design 4.10: why a raise was not raised. `tooDeep` (plan decision 8): past PLUGIN_EVENT_DEPTH_MAX. */
|
|
44
|
+
export declare const PLUGIN_EVENT_REFUSALS: readonly ["invalid", "unknownEvent", "tooLarge", "tooMany", "inactive", "tooDeep"];
|
|
45
|
+
export type PluginEventRefusal = (typeof PLUGIN_EVENT_REFUSALS)[number];
|
|
46
|
+
/** A contract name: the action id alphabet, a-z first, a-z, 0-9 and "-" after, no "-" last, 1 to SERVICE_NAME_MAX. */
|
|
47
|
+
export declare function isContractName(value: unknown): value is string;
|
|
48
|
+
/** A method name, event name or refusal code: a-z first, then a-z, A-Z and 0-9, 1 to SERVICE_NAME_MAX. */
|
|
49
|
+
export declare function isServiceMemberName(value: unknown): value is string;
|
|
50
|
+
export interface ContractVersion {
|
|
51
|
+
major: number;
|
|
52
|
+
minor: number;
|
|
53
|
+
}
|
|
54
|
+
/** `<major>.<minor>`, or null. */
|
|
55
|
+
export declare function parseContractVersion(value: unknown): ContractVersion | null;
|
|
56
|
+
export declare function formatContractVersion(version: ContractVersion): string;
|
|
57
|
+
export interface ContractRange extends ContractVersion {
|
|
58
|
+
/** True for an exact `<major>.<minor>`; false for `^<major>.<minor>`. */
|
|
59
|
+
exact: boolean;
|
|
60
|
+
}
|
|
61
|
+
/** Plan decision 3: `^<major>.<minor>` or an exact `<major>.<minor>`, or null. */
|
|
62
|
+
export declare function parseContractRange(value: unknown): ContractRange | null;
|
|
63
|
+
/** Whether `version` is inside `range`; an unreadable range or version admits nothing. */
|
|
64
|
+
export declare function contractRangeAllows(range: string, version: string): boolean;
|
|
65
|
+
/** A contract's full id, `<owner plugin id>/<name>`. */
|
|
66
|
+
export declare function contractId(ownerId: string, name: string): string;
|
|
67
|
+
/** A contract id split at its one "/", or null: the length is capped before anything reads it. */
|
|
68
|
+
export declare function parseContractId(value: unknown): {
|
|
69
|
+
ownerId: string;
|
|
70
|
+
name: string;
|
|
71
|
+
} | null;
|
|
72
|
+
/** M35 B1c (plan decision 3): the prefix of a contract version's fingerprint. */
|
|
73
|
+
export declare const CONTRACT_FINGERPRINT_PREFIX = "sha256:";
|
|
74
|
+
/** `sha256:` and 64 lower-case hex digits, read by a linear scan. */
|
|
75
|
+
export declare function isContractFingerprint(value: unknown): value is string;
|
|
76
|
+
/** A plugin event's hook key, `<plugin id>:<name>`. A core event has no "." before its ":", a plugin id always has one. */
|
|
77
|
+
export declare function pluginEventKey(pluginId: string, name: string): string;
|
|
78
|
+
/** A plugin event key split at its one ":", or null; a core event (no dot in its first part) is never one. */
|
|
79
|
+
export declare function parsePluginEventKey(value: unknown): {
|
|
80
|
+
pluginId: string;
|
|
81
|
+
name: string;
|
|
82
|
+
} | null;
|
|
83
|
+
/** Plan decision 4: the key of a provider's refusal answer. */
|
|
84
|
+
export declare const REFUSAL_ANSWER_KEY = "refused";
|
|
85
|
+
/** The code of `{ refused: "<code>" }`, a plain object whose only own key is `refused`, or null. */
|
|
86
|
+
export declare function readRefusalAnswer(value: unknown): string | null;
|
|
87
|
+
/** Design 4.7: the words a contract field's name may not hold, compared lower-cased with "_" and "-" dropped. */
|
|
88
|
+
export declare const SECRET_LIKE_WORDS: readonly ["secret", "password", "token", "apikey"];
|
|
89
|
+
/** Whether a property name holds one of SECRET_LIKE_WORDS. At most 200 characters are read. */
|
|
90
|
+
export declare function isSecretLikeName(name: string): boolean;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { PLUGIN_ID_MAX, isPluginManifestId } from "./plugin-id-rules.js";
|
|
2
|
+
import { isLowerToken } from "./plugin-providers.js";
|
|
3
|
+
// M35 B1a (W16): the rules of plugins offering services and events to each other, read by the SDK's
|
|
4
|
+
// manifest check, `kardalum plugin validate`, the marketplace door and the server, so the four never
|
|
5
|
+
// differ. Every reader caps the length first and then reads the text in one loop: no pattern ever
|
|
6
|
+
// meets an author's or a caller's text, and no message quotes a value.
|
|
7
|
+
/** A contract name, method name, event name or refusal code: 1 to 40 characters. */
|
|
8
|
+
export const SERVICE_NAME_MAX = 40;
|
|
9
|
+
/** The most of each declaration one plugin makes. */
|
|
10
|
+
export const SERVICE_CONTRACTS_MAX = 10;
|
|
11
|
+
export const SERVICE_OFFERS_MAX = 20;
|
|
12
|
+
export const SERVICE_USES_MAX = 20;
|
|
13
|
+
export const PLUGIN_EVENTS_MAX = 20;
|
|
14
|
+
/** The most methods one contract declares, and refusal codes one method declares. */
|
|
15
|
+
export const SERVICE_METHODS_MAX = 16;
|
|
16
|
+
export const SERVICE_REFUSALS_MAX = 16;
|
|
17
|
+
/** The most personal output fields one contract declares across its methods: the install summary lists each. */
|
|
18
|
+
export const SERVICE_PERSONAL_OUTPUT_MAX = 256;
|
|
19
|
+
/** The most plugin events one plugin hooks: the install summary lists each. */
|
|
20
|
+
export const PLUGIN_EVENT_LISTENS_MAX = 64;
|
|
21
|
+
/** A method's time limit, in milliseconds: the owner's `timeMs`, at least the minimum, at most the mail sender's limit. */
|
|
22
|
+
export const SERVICE_CALL_TIME_MS_DEFAULT = 5_000;
|
|
23
|
+
export const SERVICE_CALL_TIME_MS_MIN = 100;
|
|
24
|
+
export const SERVICE_CALL_TIME_MS_MAX = 30_000;
|
|
25
|
+
/** The most calls running at once for one provider; a call past it answers `busy`. */
|
|
26
|
+
export const SERVICE_CALLS_RUNNING_MAX = 8;
|
|
27
|
+
/** A call still running after this long gives its slot back; it keeps running uncounted, as a hook's handler does. */
|
|
28
|
+
export const SERVICE_SLOT_RELEASE_MS = 30_000;
|
|
29
|
+
/** The most calls in one chain (a consumer's call, a nested call, a call inside that). */
|
|
30
|
+
export const SERVICE_CALL_DEPTH_MAX = 3;
|
|
31
|
+
/** The most calls one connection makes in a minute; past it a call answers `tooMany`. */
|
|
32
|
+
export const SERVICE_CALLS_PER_MINUTE_MAX = 600;
|
|
33
|
+
/** The largest input and output, measured on their JSON in UTF-8 bytes. */
|
|
34
|
+
export const SERVICE_PAYLOAD_BYTES_MAX = 262_144;
|
|
35
|
+
/** The largest plugin event payload, the most raises one plugin makes a minute, and the deepest raise chain. */
|
|
36
|
+
export const PLUGIN_EVENT_PAYLOAD_BYTES_MAX = 16_384;
|
|
37
|
+
export const PLUGIN_EVENTS_PER_MINUTE_MAX = 600;
|
|
38
|
+
export const PLUGIN_EVENT_DEPTH_MAX = 3;
|
|
39
|
+
/** How long an instance trusts its read of the connection approvals; a revoke reaches every instance within it. */
|
|
40
|
+
export const SERVICE_GRANTS_MEMO_MS = 5_000;
|
|
41
|
+
/** The largest major or minor part of a contract version. */
|
|
42
|
+
export const CONTRACT_VERSION_PART_MAX = 999;
|
|
43
|
+
/** Design 4.4: why a call answered no value. A closed list that only grows. */
|
|
44
|
+
export const SERVICE_FAILURE_REASONS = [
|
|
45
|
+
"missing",
|
|
46
|
+
"off",
|
|
47
|
+
"notGranted",
|
|
48
|
+
"incompatible",
|
|
49
|
+
"unlicensed",
|
|
50
|
+
"ambiguous",
|
|
51
|
+
"notImplemented",
|
|
52
|
+
"busy",
|
|
53
|
+
"timeout",
|
|
54
|
+
"failed",
|
|
55
|
+
"invalidAnswer",
|
|
56
|
+
"refused",
|
|
57
|
+
"loop",
|
|
58
|
+
"tooMany",
|
|
59
|
+
];
|
|
60
|
+
/** Design 4.3: a provider's state as `context.services.list` answers it. */
|
|
61
|
+
export const SERVICE_PROVIDER_STATES = ["ready", "off", "notGranted", "unlicensed", "incompatible"];
|
|
62
|
+
/** Design 4.10: why a raise was not raised. `tooDeep` (plan decision 8): past PLUGIN_EVENT_DEPTH_MAX. */
|
|
63
|
+
export const PLUGIN_EVENT_REFUSALS = ["invalid", "unknownEvent", "tooLarge", "tooMany", "inactive", "tooDeep"];
|
|
64
|
+
const HYPHEN = 45;
|
|
65
|
+
const DOT = 46;
|
|
66
|
+
/** A contract name: the action id alphabet, a-z first, a-z, 0-9 and "-" after, no "-" last, 1 to SERVICE_NAME_MAX. */
|
|
67
|
+
export function isContractName(value) {
|
|
68
|
+
return typeof value === "string" && isLowerToken(value, SERVICE_NAME_MAX, HYPHEN, false);
|
|
69
|
+
}
|
|
70
|
+
/** A method name, event name or refusal code: a-z first, then a-z, A-Z and 0-9, 1 to SERVICE_NAME_MAX. */
|
|
71
|
+
export function isServiceMemberName(value) {
|
|
72
|
+
if (typeof value !== "string" || value.length === 0 || value.length > SERVICE_NAME_MAX)
|
|
73
|
+
return false;
|
|
74
|
+
const first = value.charCodeAt(0);
|
|
75
|
+
if (first < 97 || first > 122)
|
|
76
|
+
return false;
|
|
77
|
+
for (let i = 1; i < value.length; i++) {
|
|
78
|
+
const code = value.charCodeAt(i);
|
|
79
|
+
const lower = code >= 97 && code <= 122;
|
|
80
|
+
const upper = code >= 65 && code <= 90;
|
|
81
|
+
const digit = code >= 48 && code <= 57;
|
|
82
|
+
if (!lower && !upper && !digit)
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
/** One decimal part, 0 to CONTRACT_VERSION_PART_MAX, no leading zero, or null. */
|
|
88
|
+
function readPart(text) {
|
|
89
|
+
if (text.length === 0 || text.length > 3)
|
|
90
|
+
return null;
|
|
91
|
+
if (text.length > 1 && text.charCodeAt(0) === 48)
|
|
92
|
+
return null;
|
|
93
|
+
let value = 0;
|
|
94
|
+
for (let i = 0; i < text.length; i++) {
|
|
95
|
+
const code = text.charCodeAt(i);
|
|
96
|
+
if (code < 48 || code > 57)
|
|
97
|
+
return null;
|
|
98
|
+
value = value * 10 + (code - 48);
|
|
99
|
+
}
|
|
100
|
+
return value <= CONTRACT_VERSION_PART_MAX ? value : null;
|
|
101
|
+
}
|
|
102
|
+
/** `<major>.<minor>`, or null. */
|
|
103
|
+
export function parseContractVersion(value) {
|
|
104
|
+
if (typeof value !== "string" || value.length < 3 || value.length > 7)
|
|
105
|
+
return null;
|
|
106
|
+
const dot = value.indexOf(".");
|
|
107
|
+
if (dot === -1 || value.indexOf(".", dot + 1) !== -1)
|
|
108
|
+
return null;
|
|
109
|
+
const major = readPart(value.slice(0, dot));
|
|
110
|
+
const minor = readPart(value.slice(dot + 1));
|
|
111
|
+
return major === null || minor === null ? null : { major, minor };
|
|
112
|
+
}
|
|
113
|
+
export function formatContractVersion(version) {
|
|
114
|
+
return `${version.major}.${version.minor}`;
|
|
115
|
+
}
|
|
116
|
+
/** Plan decision 3: `^<major>.<minor>` or an exact `<major>.<minor>`, or null. */
|
|
117
|
+
export function parseContractRange(value) {
|
|
118
|
+
if (typeof value !== "string" || value.length === 0 || value.length > 8)
|
|
119
|
+
return null;
|
|
120
|
+
const caret = value.charCodeAt(0) === 94;
|
|
121
|
+
const version = parseContractVersion(caret ? value.slice(1) : value);
|
|
122
|
+
return version === null ? null : { ...version, exact: !caret };
|
|
123
|
+
}
|
|
124
|
+
/** Whether `version` is inside `range`; an unreadable range or version admits nothing. */
|
|
125
|
+
export function contractRangeAllows(range, version) {
|
|
126
|
+
const wanted = parseContractRange(range);
|
|
127
|
+
const offered = parseContractVersion(version);
|
|
128
|
+
if (wanted === null || offered === null || wanted.major !== offered.major)
|
|
129
|
+
return false;
|
|
130
|
+
return wanted.exact ? offered.minor === wanted.minor : offered.minor >= wanted.minor;
|
|
131
|
+
}
|
|
132
|
+
/** A contract's full id, `<owner plugin id>/<name>`. */
|
|
133
|
+
export function contractId(ownerId, name) {
|
|
134
|
+
return `${ownerId}/${name}`;
|
|
135
|
+
}
|
|
136
|
+
/** A contract id split at its one "/", or null: the length is capped before anything reads it. */
|
|
137
|
+
export function parseContractId(value) {
|
|
138
|
+
if (typeof value !== "string" || value.length === 0 || value.length > PLUGIN_ID_MAX + 1 + SERVICE_NAME_MAX)
|
|
139
|
+
return null;
|
|
140
|
+
const slash = value.indexOf("/");
|
|
141
|
+
if (slash <= 0 || value.indexOf("/", slash + 1) !== -1)
|
|
142
|
+
return null;
|
|
143
|
+
const ownerId = value.slice(0, slash);
|
|
144
|
+
const name = value.slice(slash + 1);
|
|
145
|
+
return isPluginManifestId(ownerId) && isContractName(name) ? { ownerId, name } : null;
|
|
146
|
+
}
|
|
147
|
+
/** M35 B1c (plan decision 3): the prefix of a contract version's fingerprint. */
|
|
148
|
+
export const CONTRACT_FINGERPRINT_PREFIX = "sha256:";
|
|
149
|
+
/** `sha256:` and 64 lower-case hex digits, read by a linear scan. */
|
|
150
|
+
export function isContractFingerprint(value) {
|
|
151
|
+
if (typeof value !== "string" || value.length !== CONTRACT_FINGERPRINT_PREFIX.length + 64 || !value.startsWith(CONTRACT_FINGERPRINT_PREFIX))
|
|
152
|
+
return false;
|
|
153
|
+
for (let i = CONTRACT_FINGERPRINT_PREFIX.length; i < value.length; i++) {
|
|
154
|
+
const code = value.charCodeAt(i);
|
|
155
|
+
if (!((code >= 48 && code <= 57) || (code >= 97 && code <= 102)))
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
/** A plugin event's hook key, `<plugin id>:<name>`. A core event has no "." before its ":", a plugin id always has one. */
|
|
161
|
+
export function pluginEventKey(pluginId, name) {
|
|
162
|
+
return `${pluginId}:${name}`;
|
|
163
|
+
}
|
|
164
|
+
/** A plugin event key split at its one ":", or null; a core event (no dot in its first part) is never one. */
|
|
165
|
+
export function parsePluginEventKey(value) {
|
|
166
|
+
if (typeof value !== "string" || value.length === 0 || value.length > PLUGIN_ID_MAX + 1 + SERVICE_NAME_MAX)
|
|
167
|
+
return null;
|
|
168
|
+
const colon = value.indexOf(":");
|
|
169
|
+
if (colon <= 0 || value.indexOf(":", colon + 1) !== -1)
|
|
170
|
+
return null;
|
|
171
|
+
const pluginId = value.slice(0, colon);
|
|
172
|
+
const name = value.slice(colon + 1);
|
|
173
|
+
if (pluginId.indexOf(String.fromCharCode(DOT)) === -1)
|
|
174
|
+
return null;
|
|
175
|
+
return isPluginManifestId(pluginId) && isServiceMemberName(name) ? { pluginId, name } : null;
|
|
176
|
+
}
|
|
177
|
+
/** Plan decision 4: the key of a provider's refusal answer. */
|
|
178
|
+
export const REFUSAL_ANSWER_KEY = "refused";
|
|
179
|
+
/** The code of `{ refused: "<code>" }`, a plain object whose only own key is `refused`, or null. */
|
|
180
|
+
export function readRefusalAnswer(value) {
|
|
181
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
182
|
+
return null;
|
|
183
|
+
const proto = Object.getPrototypeOf(value);
|
|
184
|
+
if (proto !== Object.prototype && proto !== null)
|
|
185
|
+
return null;
|
|
186
|
+
const keys = Object.keys(value);
|
|
187
|
+
if (keys.length !== 1 || keys[0] !== REFUSAL_ANSWER_KEY)
|
|
188
|
+
return null;
|
|
189
|
+
const code = value[REFUSAL_ANSWER_KEY];
|
|
190
|
+
return isServiceMemberName(code) ? code : null;
|
|
191
|
+
}
|
|
192
|
+
/** Design 4.7: the words a contract field's name may not hold, compared lower-cased with "_" and "-" dropped. */
|
|
193
|
+
export const SECRET_LIKE_WORDS = ["secret", "password", "token", "apikey"];
|
|
194
|
+
/** Whether a property name holds one of SECRET_LIKE_WORDS. At most 200 characters are read. */
|
|
195
|
+
export function isSecretLikeName(name) {
|
|
196
|
+
let folded = "";
|
|
197
|
+
for (let i = 0; i < name.length && i < 200; i++) {
|
|
198
|
+
const code = name.charCodeAt(i);
|
|
199
|
+
if (code === 95 || code === 45)
|
|
200
|
+
continue;
|
|
201
|
+
folded += code >= 65 && code <= 90 ? String.fromCharCode(code + 32) : name[i];
|
|
202
|
+
}
|
|
203
|
+
return SECRET_LIKE_WORDS.some((word) => folded.includes(word));
|
|
204
|
+
}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { PLUGIN_SETTING_DESCRIPTION_MAX } from "./plugin-labels.js";
|
|
3
|
+
/** D1: the most fields one plugin declares. */
|
|
4
|
+
export declare const PLUGIN_SETTINGS_FIELDS_MAX = 32;
|
|
5
|
+
/** D1: a field's id, 1 to 40 characters. */
|
|
6
|
+
export declare const PLUGIN_SETTING_ID_MAX = 40;
|
|
7
|
+
/** D1: the most a text field's `maxLength` may be set to. */
|
|
8
|
+
export declare const PLUGIN_SETTING_TEXT_MAX = 4096;
|
|
9
|
+
/** D1: a text field's `maxLength` when it names none. */
|
|
10
|
+
export declare const PLUGIN_SETTING_TEXT_DEFAULT_MAX = 1024;
|
|
11
|
+
/** D1: the most choices one choice field offers. */
|
|
12
|
+
export declare const PLUGIN_SETTING_CHOICES_MAX = 64;
|
|
13
|
+
/** D1: a choice value, 1 to 100 characters. */
|
|
14
|
+
export declare const PLUGIN_SETTING_CHOICE_VALUE_MAX = 100;
|
|
15
|
+
export { PLUGIN_SETTING_DESCRIPTION_MAX };
|
|
16
|
+
export declare const PLUGIN_SETTING_TYPES: readonly ["text", "number", "onOff", "choice", "secret"];
|
|
17
|
+
/** One stored setting value. `null` is "unset" (a number or a choice with no default). */
|
|
18
|
+
export type PluginSettingValue = string | number | boolean | null;
|
|
19
|
+
/** D1: a field's id: a letter first, then letters, digits and "_", 1 to 40. A linear scan. */
|
|
20
|
+
export declare function isPluginSettingId(value: string): boolean;
|
|
21
|
+
/** A field's description: a string or a language map with English, trimmed, each text at most
|
|
22
|
+
* PLUGIN_SETTING_DESCRIPTION_MAX characters (a label's rule at a longer cap). */
|
|
23
|
+
export declare const PluginSettingDescriptionSchema: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
24
|
+
en: z.ZodString;
|
|
25
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
26
|
+
export declare const PluginSettingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
type: z.ZodLiteral<"text">;
|
|
28
|
+
default: z.ZodOptional<z.ZodString>;
|
|
29
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
34
|
+
en: z.ZodString;
|
|
35
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
36
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
37
|
+
en: z.ZodString;
|
|
38
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
39
|
+
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"number">;
|
|
42
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
integer: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
49
|
+
en: z.ZodString;
|
|
50
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
51
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
52
|
+
en: z.ZodString;
|
|
53
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
54
|
+
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"onOff">;
|
|
57
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
61
|
+
en: z.ZodString;
|
|
62
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
63
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
64
|
+
en: z.ZodString;
|
|
65
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
66
|
+
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<"choice">;
|
|
69
|
+
default: z.ZodOptional<z.ZodString>;
|
|
70
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
71
|
+
value: z.ZodString;
|
|
72
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
73
|
+
en: z.ZodString;
|
|
74
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
75
|
+
}, z.core.$strict>>;
|
|
76
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
79
|
+
en: z.ZodString;
|
|
80
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
81
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
82
|
+
en: z.ZodString;
|
|
83
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
84
|
+
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
+
type: z.ZodLiteral<"secret">;
|
|
87
|
+
secret: z.ZodString;
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
90
|
+
en: z.ZodString;
|
|
91
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
92
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
93
|
+
en: z.ZodString;
|
|
94
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
95
|
+
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
}, z.core.$strict>], "type">;
|
|
97
|
+
export type PluginSettingField = z.infer<typeof PluginSettingFieldSchema>;
|
|
98
|
+
export declare const PluginSettingsDeclarationSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
99
|
+
type: z.ZodLiteral<"text">;
|
|
100
|
+
default: z.ZodOptional<z.ZodString>;
|
|
101
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
106
|
+
en: z.ZodString;
|
|
107
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
108
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
109
|
+
en: z.ZodString;
|
|
110
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
111
|
+
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
112
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
113
|
+
type: z.ZodLiteral<"number">;
|
|
114
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
integer: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
id: z.ZodString;
|
|
120
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
121
|
+
en: z.ZodString;
|
|
122
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
123
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
124
|
+
en: z.ZodString;
|
|
125
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
126
|
+
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
128
|
+
type: z.ZodLiteral<"onOff">;
|
|
129
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
133
|
+
en: z.ZodString;
|
|
134
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
135
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
136
|
+
en: z.ZodString;
|
|
137
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
138
|
+
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"choice">;
|
|
141
|
+
default: z.ZodOptional<z.ZodString>;
|
|
142
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
143
|
+
value: z.ZodString;
|
|
144
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
145
|
+
en: z.ZodString;
|
|
146
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
147
|
+
}, z.core.$strict>>;
|
|
148
|
+
inViews: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
151
|
+
en: z.ZodString;
|
|
152
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
153
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
154
|
+
en: z.ZodString;
|
|
155
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
156
|
+
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
158
|
+
type: z.ZodLiteral<"secret">;
|
|
159
|
+
secret: z.ZodString;
|
|
160
|
+
id: z.ZodString;
|
|
161
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
162
|
+
en: z.ZodString;
|
|
163
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
164
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
165
|
+
en: z.ZodString;
|
|
166
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
167
|
+
askAtInstall: z.ZodOptional<z.ZodBoolean>;
|
|
168
|
+
}, z.core.$strict>], "type">>;
|
|
169
|
+
export interface PluginSettingsProblem {
|
|
170
|
+
path: string;
|
|
171
|
+
message: string;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* D1: the cross-field rules a single field cannot see: a unique id, a secret field naming a secret the
|
|
175
|
+
* plugin declares, and each secret named by at most one field. `path` is relative to the settings list.
|
|
176
|
+
*/
|
|
177
|
+
export declare function checkPluginSettingsDeclaration(fields: readonly PluginSettingField[], declaredSecretNames: readonly string[]): PluginSettingsProblem[];
|
|
178
|
+
/**
|
|
179
|
+
* D1: the schema of a settings write: an object of the declared non-secret fields (each optional),
|
|
180
|
+
* strict, so an unknown id and a secret's id are refused. `only` narrows the fields (the install
|
|
181
|
+
* dialog asks for those marked `askAtInstall`).
|
|
182
|
+
*/
|
|
183
|
+
export declare function pluginSettingsValuesSchema(fields: readonly PluginSettingField[], opts?: {
|
|
184
|
+
only?: (field: PluginSettingField) => boolean;
|
|
185
|
+
}): z.ZodType<Record<string, PluginSettingValue>>;
|
|
186
|
+
/** D1: a non-secret field's default: its declared one, else text "", number null, onOff false, choice null. */
|
|
187
|
+
export declare function pluginSettingDefault(field: Exclude<PluginSettingField, {
|
|
188
|
+
type: "secret";
|
|
189
|
+
}>): PluginSettingValue;
|
|
190
|
+
/**
|
|
191
|
+
* D2: every declared non-secret field with its stored value when that still passes the field's rule,
|
|
192
|
+
* else its default. Never throws: `stored` may be anything, `null` included. It may be the registry
|
|
193
|
+
* column (`{ values, updatedAt }`) or the values map itself; a value is never an object, so the two
|
|
194
|
+
* cannot be confused.
|
|
195
|
+
*/
|
|
196
|
+
export declare function resolvePluginSettings(fields: readonly PluginSettingField[], stored: unknown): Record<string, PluginSettingValue>;
|
|
197
|
+
/** D4: one declared field as a screen draws it. Evidence 148: the Settings routes answer each label
|
|
198
|
+
* as declared (a string, or a language map the admin resolves in its own language); the install
|
|
199
|
+
* dialog and the setup wizard resolve them first. A secret field answers `set` and the secret's
|
|
200
|
+
* name, never a value. */
|
|
201
|
+
export declare const PluginSettingsFieldViewSchema: z.ZodObject<{
|
|
202
|
+
id: z.ZodString;
|
|
203
|
+
type: z.ZodEnum<{
|
|
204
|
+
number: "number";
|
|
205
|
+
secret: "secret";
|
|
206
|
+
text: "text";
|
|
207
|
+
choice: "choice";
|
|
208
|
+
onOff: "onOff";
|
|
209
|
+
}>;
|
|
210
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
211
|
+
en: z.ZodString;
|
|
212
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
213
|
+
description: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
214
|
+
en: z.ZodString;
|
|
215
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
216
|
+
askAtInstall: z.ZodBoolean;
|
|
217
|
+
inViews: z.ZodBoolean;
|
|
218
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
219
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
220
|
+
set: z.ZodOptional<z.ZodBoolean>;
|
|
221
|
+
stored: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
223
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
224
|
+
value: z.ZodString;
|
|
225
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
226
|
+
en: z.ZodString;
|
|
227
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
228
|
+
}, z.core.$strict>>>;
|
|
229
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
230
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
integer: z.ZodOptional<z.ZodBoolean>;
|
|
232
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
234
|
+
}, z.core.$strict>;
|
|
235
|
+
export type PluginSettingsFieldView = z.infer<typeof PluginSettingsFieldViewSchema>;
|
|
236
|
+
/**
|
|
237
|
+
* D4, D5: one declared field as a screen draws it, labels resolved to `language`, or kept as declared
|
|
238
|
+
* when `language` is null (evidence 148: the Settings routes, whose labels the admin resolves in the
|
|
239
|
+
* signed-in person's language, falling back as resolveLabel does). A non-secret field
|
|
240
|
+
* carries `value` (its default when `state` gives none) and `default`; a secret field its secret's
|
|
241
|
+
* name and `set`, never a value. The Settings routes, the setup wizard's starters and the install
|
|
242
|
+
* dialog all draw a field from this one shape.
|
|
243
|
+
*/
|
|
244
|
+
export declare function pluginSettingsFieldView(field: PluginSettingField, language: string | null, state?: {
|
|
245
|
+
value?: PluginSettingValue;
|
|
246
|
+
set?: boolean;
|
|
247
|
+
stored?: boolean;
|
|
248
|
+
}): PluginSettingsFieldView;
|
|
249
|
+
/** The outcomes a scheduled task run is recorded with. */
|
|
250
|
+
export declare const PLUGIN_TASK_RUN_OUTCOMES: readonly ["ok", "failed", "timedOut", "skipped", "aborted"];
|
|
251
|
+
export type PluginTaskRunOutcome = (typeof PLUGIN_TASK_RUN_OUTCOMES)[number];
|
|
252
|
+
/** M32 I3 (B8): why a running task was aborted, stored as the run's message. */
|
|
253
|
+
export declare const PLUGIN_TASK_ABORT_REASONS: readonly ["deactivated", "uninstalled", "updated"];
|
|
254
|
+
export type PluginTaskAbortReason = (typeof PLUGIN_TASK_ABORT_REASONS)[number];
|
|
255
|
+
/** D13: one declared scheduled task on the Settings page (its last run is filled by the task runner).
|
|
256
|
+
* Evidence 148: `name` is the declared label (a string, or a language map the admin resolves), or
|
|
257
|
+
* the task's id when the label cannot be read. */
|
|
258
|
+
export declare const PluginSettingsTaskViewSchema: z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
261
|
+
en: z.ZodString;
|
|
262
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
263
|
+
cron: z.ZodString;
|
|
264
|
+
lastRun: z.ZodNullable<z.ZodObject<{
|
|
265
|
+
at: z.ZodString;
|
|
266
|
+
outcome: z.ZodNullable<z.ZodEnum<{
|
|
267
|
+
skipped: "skipped";
|
|
268
|
+
failed: "failed";
|
|
269
|
+
ok: "ok";
|
|
270
|
+
timedOut: "timedOut";
|
|
271
|
+
aborted: "aborted";
|
|
272
|
+
}>>;
|
|
273
|
+
}, z.core.$strict>>;
|
|
274
|
+
}, z.core.$strict>;
|
|
275
|
+
export type PluginSettingsTaskView = z.infer<typeof PluginSettingsTaskViewSchema>;
|
|
276
|
+
/** D4: the answer of both routes: the fields with their current values, when they were last saved, and the tasks. */
|
|
277
|
+
export declare const PluginSettingsResponseSchema: z.ZodObject<{
|
|
278
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
279
|
+
id: z.ZodString;
|
|
280
|
+
type: z.ZodEnum<{
|
|
281
|
+
number: "number";
|
|
282
|
+
secret: "secret";
|
|
283
|
+
text: "text";
|
|
284
|
+
choice: "choice";
|
|
285
|
+
onOff: "onOff";
|
|
286
|
+
}>;
|
|
287
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
288
|
+
en: z.ZodString;
|
|
289
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
290
|
+
description: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
291
|
+
en: z.ZodString;
|
|
292
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
293
|
+
askAtInstall: z.ZodBoolean;
|
|
294
|
+
inViews: z.ZodBoolean;
|
|
295
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
296
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
297
|
+
set: z.ZodOptional<z.ZodBoolean>;
|
|
298
|
+
stored: z.ZodOptional<z.ZodBoolean>;
|
|
299
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
300
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
301
|
+
value: z.ZodString;
|
|
302
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
303
|
+
en: z.ZodString;
|
|
304
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
305
|
+
}, z.core.$strict>>>;
|
|
306
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
307
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
308
|
+
integer: z.ZodOptional<z.ZodBoolean>;
|
|
309
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
+
}, z.core.$strict>>;
|
|
312
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
313
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
314
|
+
id: z.ZodString;
|
|
315
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
316
|
+
en: z.ZodString;
|
|
317
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
318
|
+
cron: z.ZodString;
|
|
319
|
+
lastRun: z.ZodNullable<z.ZodObject<{
|
|
320
|
+
at: z.ZodString;
|
|
321
|
+
outcome: z.ZodNullable<z.ZodEnum<{
|
|
322
|
+
skipped: "skipped";
|
|
323
|
+
failed: "failed";
|
|
324
|
+
ok: "ok";
|
|
325
|
+
timedOut: "timedOut";
|
|
326
|
+
aborted: "aborted";
|
|
327
|
+
}>>;
|
|
328
|
+
}, z.core.$strict>>;
|
|
329
|
+
}, z.core.$strict>>;
|
|
330
|
+
}, z.core.$strict>;
|
|
331
|
+
export type PluginSettingsResponse = z.infer<typeof PluginSettingsResponseSchema>;
|
|
332
|
+
/** D4: the body of the `PUT`. Shape only: the field rules run in the route, against the declaration. */
|
|
333
|
+
export declare const PluginSettingsPutBodySchema: z.ZodObject<{
|
|
334
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
335
|
+
}, z.core.$strict>;
|
|
336
|
+
export type PluginSettingsPutBody = z.infer<typeof PluginSettingsPutBodySchema>;
|
|
337
|
+
/** D4: a refused `PUT`: what is wrong, keyed by field id. A value is never quoted. */
|
|
338
|
+
export declare const PluginSettingsErrorSchema: z.ZodObject<{
|
|
339
|
+
message: z.ZodString;
|
|
340
|
+
fieldErrors: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
341
|
+
}, z.core.$strict>;
|
|
342
|
+
export type PluginSettingsError = z.infer<typeof PluginSettingsErrorSchema>;
|
|
343
|
+
/**
|
|
344
|
+
* D1: the settings fields `contributions` declares, each checked as the delivery check checks it:
|
|
345
|
+
* the field's own schema, the first of an id kept, a secret field kept only when it names a secret
|
|
346
|
+
* `declaredPluginSecretsOf` reads (its whole declaration judged) and no earlier field names, at most
|
|
347
|
+
* PLUGIN_SETTINGS_FIELDS_MAX read. A field that fails is left out, so it is never drawn, asked,
|
|
348
|
+
* written or read. The server's Settings page and the install questions both read this one list.
|
|
349
|
+
* Reads plain data only: a getter on `settings` that throws means no fields, one on `secrets` no
|
|
350
|
+
* secret fields.
|
|
351
|
+
*/
|
|
352
|
+
export declare function declaredSettingsFieldsOf(contributions: unknown): readonly PluginSettingField[];
|