@kardalum/plugin-sdk 0.0.0-stage → 0.15.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 +108 -0
- package/LICENSE +202 -0
- package/README.md +70 -2
- package/dist/admin-section-registry.d.ts +34 -0
- package/dist/admin-section-registry.js +49 -0
- package/dist/built-in-serializers.d.ts +3 -0
- package/dist/built-in-serializers.js +18 -0
- package/dist/built-in-settings-schemas.d.ts +14 -0
- package/dist/built-in-settings-schemas.js +225 -0
- package/dist/built-in-value-schemas.d.ts +4 -0
- package/dist/built-in-value-schemas.js +47 -0
- package/dist/built-ins.d.ts +1 -0
- package/dist/built-ins.js +257 -0
- package/dist/capabilities.d.ts +99 -0
- package/dist/capabilities.js +363 -0
- package/dist/data-type-plugin.d.ts +28 -0
- package/dist/data-type-plugin.js +1 -0
- package/dist/datatype-validation.d.ts +26 -0
- package/dist/datatype-validation.js +110 -0
- package/dist/datatypes-entry.d.ts +4 -0
- package/dist/datatypes-entry.js +18 -0
- package/dist/define-plugin.d.ts +25 -0
- package/dist/define-plugin.js +51 -0
- package/dist/entitlement-entry.d.ts +5 -0
- package/dist/entitlement-entry.js +24 -0
- package/dist/entitlement-gate.d.ts +36 -0
- package/dist/entitlement-gate.js +201 -0
- package/dist/entitlement-types.d.ts +39 -0
- package/dist/entitlement-types.js +1 -0
- package/dist/entitlement.d.ts +57 -0
- package/dist/entitlement.js +170 -0
- package/dist/host-entry.d.ts +1 -0
- package/dist/host-entry.js +11 -0
- package/dist/icon-name.d.ts +1 -0
- package/dist/icon-name.js +1 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +10 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +93 -0
- package/dist/license-verdict-keys.d.ts +18 -0
- package/dist/license-verdict-keys.js +22 -0
- package/dist/local-host.d.ts +3 -0
- package/dist/local-host.js +38 -0
- package/dist/manifest-entry.d.ts +8 -0
- package/dist/manifest-entry.js +13 -0
- package/dist/manifest-schema.d.ts +408 -0
- package/dist/manifest-schema.js +774 -0
- package/dist/manifest.d.ts +546 -0
- package/dist/manifest.js +86 -0
- package/dist/media/media-picker.d.ts +39 -0
- package/dist/media/media-picker.js +438 -0
- package/dist/media/upload-error.d.ts +12 -0
- package/dist/media/upload-error.js +30 -0
- package/dist/plugin-context.d.ts +75 -0
- package/dist/plugin-context.js +70 -0
- package/dist/plugin-screen-context.d.ts +40 -0
- package/dist/plugin-screen-context.js +16 -0
- package/dist/register-built-ins.d.ts +1 -0
- package/dist/register-built-ins.js +41 -0
- package/dist/registry.d.ts +4 -0
- package/dist/registry.js +17 -0
- package/dist/rendition-eligibility.d.ts +24 -0
- package/dist/rendition-eligibility.js +40 -0
- package/dist/richtext/block-panel.d.ts +27 -0
- package/dist/richtext/block-panel.js +232 -0
- package/dist/richtext/extensions.d.ts +19 -0
- package/dist/richtext/extensions.js +56 -0
- package/dist/richtext/insert-menu.d.ts +24 -0
- package/dist/richtext/insert-menu.js +142 -0
- package/dist/richtext/kardalum-block.d.ts +33 -0
- package/dist/richtext/kardalum-block.js +282 -0
- package/dist/richtext/style-listbox.d.ts +10 -0
- package/dist/richtext/style-listbox.js +69 -0
- package/dist/richtext/text-style-class.d.ts +18 -0
- package/dist/richtext/text-style-class.js +36 -0
- package/dist/simple-storage-value-provider.d.ts +9 -0
- package/dist/simple-storage-value-provider.js +96 -0
- package/dist/structured-storage-types.d.ts +61 -0
- package/dist/structured-storage-types.js +11 -0
- package/dist/tailwind.d.ts +1 -0
- package/dist/tailwind.js +5 -0
- package/dist/tokens/system-dark.css +75 -0
- package/dist/tokens/tokens.css +239 -0
- package/dist/tokens/tokens.json +212 -0
- package/dist/tokens.d.ts +1 -0
- package/dist/tokens.js +11 -0
- package/dist/ui-entry.d.ts +5 -0
- package/dist/ui-entry.js +42 -0
- package/dist/views/content-list-preview.d.ts +1 -0
- package/dist/views/content-list-preview.js +14 -0
- package/dist/views/content-list-settings-view.d.ts +1 -0
- package/dist/views/content-list-settings-view.js +97 -0
- package/dist/views/content-list-view.d.ts +19 -0
- package/dist/views/content-list-view.js +248 -0
- package/dist/views/crop-view.d.ts +55 -0
- package/dist/views/crop-view.js +161 -0
- package/dist/views/date-range-view.d.ts +6 -0
- package/dist/views/date-range-view.js +55 -0
- package/dist/views/file-upload-view.d.ts +43 -0
- package/dist/views/file-upload-view.js +104 -0
- package/dist/views/html-code-editor.d.ts +10 -0
- package/dist/views/html-code-editor.js +101 -0
- package/dist/views/html-view.d.ts +3 -0
- package/dist/views/html-view.js +53 -0
- package/dist/views/image-view.d.ts +3 -0
- package/dist/views/image-view.js +387 -0
- package/dist/views/rich-text-view.d.ts +2 -0
- package/dist/views/rich-text-view.js +429 -0
- package/node_modules/@kardalum/api-schemas/LICENSE +202 -0
- package/node_modules/@kardalum/api-schemas/README.md +56 -0
- package/node_modules/@kardalum/api-schemas/dist/action.schema.d.ts +30 -0
- package/node_modules/@kardalum/api-schemas/dist/action.schema.js +88 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +36 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.d.ts +89 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.d.ts +24 -0
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.js +47 -0
- package/node_modules/@kardalum/api-schemas/dist/auth.schema.d.ts +38 -0
- package/node_modules/@kardalum/api-schemas/dist/auth.schema.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +537 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +353 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +158 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +125 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +256 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.d.ts +151 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +82 -0
- package/node_modules/@kardalum/api-schemas/dist/content-version.schema.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/content-version.schema.js +22 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +17 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +20 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +302 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +97 -0
- package/node_modules/@kardalum/api-schemas/dist/culture-direction.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/culture-direction.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +36 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +296 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +121 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +147 -0
- package/node_modules/@kardalum/api-schemas/dist/health.schema.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/health.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/html-entities.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/html-entities.js +250 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +102 -0
- package/node_modules/@kardalum/api-schemas/dist/index.js +58 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +381 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +167 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +214 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-use.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-use.js +117 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +27 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +279 -0
- package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.d.ts +74 -0
- package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.js +157 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +80 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +156 -0
- package/node_modules/@kardalum/api-schemas/dist/nav.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/nav.schema.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +846 -0
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +356 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +169 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.js +80 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.js +889 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +89 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +134 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +369 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +393 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +87 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +24 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +306 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +328 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +79 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +50 -0
- package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/reserved-slugs.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/reserved-slugs.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.js +69 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content-outcome.schema.d.ts +17 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content-outcome.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +108 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +93 -0
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.d.ts +243 -0
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +296 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +43 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +25 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +30 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +112 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +74 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +39 -0
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.d.ts +21 -0
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +89 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +68 -0
- package/node_modules/@kardalum/api-schemas/package.json +35 -0
- package/node_modules/@kardalum/design-tokens/LICENSE +202 -0
- package/node_modules/@kardalum/design-tokens/README.md +29 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.d.ts +32 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +88 -0
- package/node_modules/@kardalum/design-tokens/dist/generate.d.ts +1 -0
- package/node_modules/@kardalum/design-tokens/dist/generate.js +18 -0
- package/node_modules/@kardalum/design-tokens/dist/index.d.ts +6 -0
- package/node_modules/@kardalum/design-tokens/dist/index.js +4 -0
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +75 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +33 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +54 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-css.d.ts +12 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-css.js +42 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-types.d.ts +43 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-types.js +1 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.d.ts +13 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.js +120 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/index.d.ts +5 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/index.js +4 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/light.d.ts +9 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/light.js +13 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +239 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +25 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +276 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +212 -0
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +91 -0
- package/node_modules/@kardalum/design-tokens/dist/types.js +5 -0
- package/node_modules/@kardalum/design-tokens/package.json +42 -0
- package/node_modules/@kardalum/plugin-package/LICENSE +202 -0
- package/node_modules/@kardalum/plugin-package/README.md +71 -0
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.d.ts +50 -0
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.js +659 -0
- package/node_modules/@kardalum/plugin-package/dist/envelope.d.ts +19 -0
- package/node_modules/@kardalum/plugin-package/dist/envelope.js +104 -0
- package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +37 -0
- package/node_modules/@kardalum/plugin-package/dist/extract.js +199 -0
- package/node_modules/@kardalum/plugin-package/dist/hash.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/hash.js +69 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +11 -0
- package/node_modules/@kardalum/plugin-package/dist/index.js +7 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +185 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +236 -0
- package/node_modules/@kardalum/plugin-package/dist/package-contract.d.ts +50 -0
- package/node_modules/@kardalum/plugin-package/dist/package-contract.js +115 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.js +17 -0
- package/node_modules/@kardalum/plugin-package/dist/types.d.ts +45 -0
- package/node_modules/@kardalum/plugin-package/dist/types.js +1 -0
- package/node_modules/@kardalum/plugin-package/package.json +49 -0
- package/node_modules/@kardalum/ui/LICENSE +202 -0
- package/node_modules/@kardalum/ui/README.md +35 -0
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.d.ts +14 -0
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.js +38 -0
- package/node_modules/@kardalum/ui/dist/components/badge.d.ts +9 -0
- package/node_modules/@kardalum/ui/dist/components/badge.js +30 -0
- package/node_modules/@kardalum/ui/dist/components/button.d.ts +11 -0
- package/node_modules/@kardalum/ui/dist/components/button.js +37 -0
- package/node_modules/@kardalum/ui/dist/components/checkbox.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/components/checkbox.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/dialog.d.ts +17 -0
- package/node_modules/@kardalum/ui/dist/components/dialog.js +48 -0
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.d.ts +18 -0
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +53 -0
- package/node_modules/@kardalum/ui/dist/components/empty-state.d.ts +30 -0
- package/node_modules/@kardalum/ui/dist/components/empty-state.js +9 -0
- package/node_modules/@kardalum/ui/dist/components/input.d.ts +4 -0
- package/node_modules/@kardalum/ui/dist/components/input.js +6 -0
- package/node_modules/@kardalum/ui/dist/components/panel.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/components/panel.js +6 -0
- package/node_modules/@kardalum/ui/dist/components/property-field.d.ts +19 -0
- package/node_modules/@kardalum/ui/dist/components/property-field.js +86 -0
- package/node_modules/@kardalum/ui/dist/components/sheet.d.ts +17 -0
- package/node_modules/@kardalum/ui/dist/components/sheet.js +55 -0
- package/node_modules/@kardalum/ui/dist/components/skeleton.d.ts +3 -0
- package/node_modules/@kardalum/ui/dist/components/skeleton.js +9 -0
- package/node_modules/@kardalum/ui/dist/components/switch.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/components/switch.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/tab-strip.d.ts +34 -0
- package/node_modules/@kardalum/ui/dist/components/tab-strip.js +72 -0
- package/node_modules/@kardalum/ui/dist/components/toast.d.ts +18 -0
- package/node_modules/@kardalum/ui/dist/components/toast.js +42 -0
- package/node_modules/@kardalum/ui/dist/components/toaster.d.ts +12 -0
- package/node_modules/@kardalum/ui/dist/components/toaster.js +11 -0
- package/node_modules/@kardalum/ui/dist/components/use-toast.d.ts +17 -0
- package/node_modules/@kardalum/ui/dist/components/use-toast.js +62 -0
- package/node_modules/@kardalum/ui/dist/index.d.ts +18 -0
- package/node_modules/@kardalum/ui/dist/index.js +18 -0
- package/node_modules/@kardalum/ui/dist/lib/cn.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/lib/cn.js +5 -0
- package/node_modules/@kardalum/ui/package.json +63 -0
- package/package.json +146 -4
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PLUGIN_DOC_ROLES: readonly ["overview", "setup", "configuration", "guide", "troubleshooting"];
|
|
3
|
+
export type PluginDocRole = (typeof PLUGIN_DOC_ROLES)[number];
|
|
4
|
+
export declare const MAX_DOC_PAGES = 40;
|
|
5
|
+
export declare const MAX_DOC_PAGE_BYTES: number;
|
|
6
|
+
export declare const RESERVED_DOC_SLUGS: ReadonlySet<string>;
|
|
7
|
+
export declare const PluginDocsPageSchema: z.ZodObject<{
|
|
8
|
+
role: z.ZodEnum<{
|
|
9
|
+
overview: "overview";
|
|
10
|
+
setup: "setup";
|
|
11
|
+
configuration: "configuration";
|
|
12
|
+
guide: "guide";
|
|
13
|
+
troubleshooting: "troubleshooting";
|
|
14
|
+
}>;
|
|
15
|
+
path: z.ZodString;
|
|
16
|
+
title: z.ZodString;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export type PluginDocsPage = z.infer<typeof PluginDocsPageSchema>;
|
|
19
|
+
/** The page's URL slug on every surface: its file name without ".md", and
|
|
20
|
+
* "overview" for the README. */
|
|
21
|
+
export declare function docSlug(path: string): string;
|
|
22
|
+
/** No `docs` field means the README is the one page (spec D2). */
|
|
23
|
+
export declare function effectiveDocsPages(docs: PluginDocsPage[] | undefined, pluginName: string): PluginDocsPage[];
|
|
24
|
+
export interface DocsDeclarationIssue {
|
|
25
|
+
path: (string | number)[];
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
/** The rules over a declared list that one page's shape cannot express. */
|
|
29
|
+
export declare function checkDocsDeclaration(docs: ReadonlyArray<PluginDocsPage>): DocsDeclarationIssue[];
|
|
30
|
+
export interface DocsFacts {
|
|
31
|
+
hasMigrations: boolean;
|
|
32
|
+
hasDependencies: boolean;
|
|
33
|
+
hasPrice: boolean;
|
|
34
|
+
hasDocumentTypes: boolean;
|
|
35
|
+
hasSettingsPages: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Reads the five facts from a live manifest or from manifest.json. The
|
|
38
|
+
* summary keeps each contribution list as a list of redacted entries,
|
|
39
|
+
* reduces migrations to their ids, and says `paid: true` where the live
|
|
40
|
+
* manifest has a price above 0: the amount itself never reaches
|
|
41
|
+
* manifest.json, because the marketplace would seed a listing price from
|
|
42
|
+
* it. */
|
|
43
|
+
export declare function docsFactsFrom(manifest: unknown): DocsFacts;
|
|
44
|
+
/** Which roles the door requires, each with the declaration that requires
|
|
45
|
+
* it, so a refusal can say why. Derived, never declared (spec D1). */
|
|
46
|
+
export declare function requiredDocRoles(facts: DocsFacts): Array<{
|
|
47
|
+
role: PluginDocRole;
|
|
48
|
+
because: string;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const PluginReferenceSchema: z.ZodObject<{
|
|
51
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
label: z.ZodString;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
label: z.ZodString;
|
|
58
|
+
actions: z.ZodArray<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
apiRoutes: z.ZodArray<z.ZodObject<{
|
|
61
|
+
method: z.ZodString;
|
|
62
|
+
path: z.ZodString;
|
|
63
|
+
access: z.ZodString;
|
|
64
|
+
action: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strict>>;
|
|
66
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
67
|
+
id: z.ZodString;
|
|
68
|
+
mediation: z.ZodString;
|
|
69
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
70
|
+
}, z.core.$strict>>;
|
|
71
|
+
documentTypes: z.ZodArray<z.ZodObject<{
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
kind: z.ZodString;
|
|
74
|
+
fields: z.ZodArray<z.ZodUnknown>;
|
|
75
|
+
}, z.core.$loose>>;
|
|
76
|
+
dataTypes: z.ZodArray<z.ZodObject<{
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
}, z.core.$loose>>;
|
|
80
|
+
settingsPages: z.ZodArray<z.ZodObject<{
|
|
81
|
+
id: z.ZodString;
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
action: z.ZodString;
|
|
84
|
+
}, z.core.$strict>>;
|
|
85
|
+
}, z.core.$strict>;
|
|
86
|
+
export type PluginReference = z.infer<typeof PluginReferenceSchema>;
|
|
87
|
+
export declare const REFERENCE_PAGE_SLUGS: readonly ["permissions", "api-routes", "capabilities", "content", "settings"];
|
|
88
|
+
/** The generated pages this plugin gets, in their fixed order (spec section 7). */
|
|
89
|
+
export declare function referencePageSlugs(reference: PluginReference): string[];
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { PluginActionDeclarationSchema, PluginRoleOfferSchema } from "./plugin-actions.schema.js";
|
|
3
|
+
import { HOSTILE_CHARS_MESSAGE, hasHostileChars } from "./plugin-docs-text.js";
|
|
4
|
+
// S286, the docs contract (2026-10-04-s285-the-docs-contract-design.md).
|
|
5
|
+
// The contract's pure parts live here so the SDK's manifest schema, the
|
|
6
|
+
// CLI and the package door run the same definitions.
|
|
7
|
+
export const PLUGIN_DOC_ROLES = ["overview", "setup", "configuration", "guide", "troubleshooting"];
|
|
8
|
+
/** A guide may repeat; every other role appears at most once. */
|
|
9
|
+
const SINGLE_USE_ROLES = new Set(["overview", "setup", "configuration", "troubleshooting"]);
|
|
10
|
+
export const MAX_DOC_PAGES = 40;
|
|
11
|
+
export const MAX_DOC_PAGE_BYTES = 256 * 1024;
|
|
12
|
+
export const RESERVED_DOC_SLUGS = new Set(["reference", "search"]);
|
|
13
|
+
const DOC_PATH = /^(README\.md|docs\/[a-z0-9][a-z0-9-]*\.md)$/;
|
|
14
|
+
export const PluginDocsPageSchema = z
|
|
15
|
+
.object({
|
|
16
|
+
role: z.enum(PLUGIN_DOC_ROLES),
|
|
17
|
+
path: z.string().regex(DOC_PATH, 'must be "README.md" or a lower-case file directly under "docs/" ending ".md"'),
|
|
18
|
+
title: z.string().trim().min(1).max(80).refine((title) => !hasHostileChars(title), HOSTILE_CHARS_MESSAGE),
|
|
19
|
+
})
|
|
20
|
+
.strict();
|
|
21
|
+
/** The page's URL slug on every surface: its file name without ".md", and
|
|
22
|
+
* "overview" for the README. */
|
|
23
|
+
export function docSlug(path) {
|
|
24
|
+
if (path === "README.md")
|
|
25
|
+
return "overview";
|
|
26
|
+
return path.slice("docs/".length, -".md".length);
|
|
27
|
+
}
|
|
28
|
+
/** No `docs` field means the README is the one page (spec D2). */
|
|
29
|
+
export function effectiveDocsPages(docs, pluginName) {
|
|
30
|
+
return docs ?? [{ role: "overview", path: "README.md", title: pluginName }];
|
|
31
|
+
}
|
|
32
|
+
/** The rules over a declared list that one page's shape cannot express. */
|
|
33
|
+
export function checkDocsDeclaration(docs) {
|
|
34
|
+
const issues = [];
|
|
35
|
+
if (docs.length > MAX_DOC_PAGES) {
|
|
36
|
+
issues.push({ path: ["docs"], message: `a plugin may declare at most ${MAX_DOC_PAGES} docs pages` });
|
|
37
|
+
}
|
|
38
|
+
const rolesSeen = new Set();
|
|
39
|
+
const pathsSeen = new Set();
|
|
40
|
+
const pathBySlug = new Map();
|
|
41
|
+
docs.forEach((page, index) => {
|
|
42
|
+
if (SINGLE_USE_ROLES.has(page.role)) {
|
|
43
|
+
if (rolesSeen.has(page.role)) {
|
|
44
|
+
issues.push({ path: ["docs", index, "role"], message: `docs role "${page.role}" may appear only once` });
|
|
45
|
+
}
|
|
46
|
+
rolesSeen.add(page.role);
|
|
47
|
+
}
|
|
48
|
+
if (pathsSeen.has(page.path)) {
|
|
49
|
+
issues.push({ path: ["docs", index, "path"], message: `docs path "${page.path}" is declared more than once` });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
pathsSeen.add(page.path);
|
|
53
|
+
const slug = docSlug(page.path);
|
|
54
|
+
if (RESERVED_DOC_SLUGS.has(slug)) {
|
|
55
|
+
issues.push({ path: ["docs", index, "path"], message: `docs page "${page.path}" uses the reserved slug "${slug}"` });
|
|
56
|
+
}
|
|
57
|
+
const earlier = pathBySlug.get(slug);
|
|
58
|
+
if (earlier !== undefined) {
|
|
59
|
+
issues.push({ path: ["docs", index, "path"], message: `docs pages "${earlier}" and "${page.path}" share the slug "${slug}"` });
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
pathBySlug.set(slug, page.path);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return issues;
|
|
66
|
+
}
|
|
67
|
+
function present(value) {
|
|
68
|
+
if (Array.isArray(value))
|
|
69
|
+
return value.length > 0;
|
|
70
|
+
return value === true;
|
|
71
|
+
}
|
|
72
|
+
/** Reads the five facts from a live manifest or from manifest.json. The
|
|
73
|
+
* summary keeps each contribution list as a list of redacted entries,
|
|
74
|
+
* reduces migrations to their ids, and says `paid: true` where the live
|
|
75
|
+
* manifest has a price above 0: the amount itself never reaches
|
|
76
|
+
* manifest.json, because the marketplace would seed a listing price from
|
|
77
|
+
* it. */
|
|
78
|
+
export function docsFactsFrom(manifest) {
|
|
79
|
+
const source = (manifest && typeof manifest === "object" ? manifest : {});
|
|
80
|
+
const contributions = (source.contributions && typeof source.contributions === "object" ? source.contributions : {});
|
|
81
|
+
return {
|
|
82
|
+
hasMigrations: present(source.migrations),
|
|
83
|
+
hasDependencies: present(source.pluginDependencies),
|
|
84
|
+
hasPrice: (typeof source.price === "number" && source.price > 0) || source.paid === true,
|
|
85
|
+
hasDocumentTypes: present(contributions.documentTypes),
|
|
86
|
+
hasSettingsPages: present(contributions.settingsPages),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** Which roles the door requires, each with the declaration that requires
|
|
90
|
+
* it, so a refusal can say why. Derived, never declared (spec D1). */
|
|
91
|
+
export function requiredDocRoles(facts) {
|
|
92
|
+
const required = [{ role: "overview", because: "every plugin" }];
|
|
93
|
+
const setup = [
|
|
94
|
+
facts.hasMigrations ? "migrations" : null,
|
|
95
|
+
facts.hasDependencies ? "pluginDependencies" : null,
|
|
96
|
+
facts.hasPrice ? "a price" : null,
|
|
97
|
+
facts.hasDocumentTypes ? "documentTypes" : null,
|
|
98
|
+
].filter((reason) => reason !== null);
|
|
99
|
+
if (setup.length > 0)
|
|
100
|
+
required.push({ role: "setup", because: setup.join(", ") });
|
|
101
|
+
if (facts.hasSettingsPages)
|
|
102
|
+
required.push({ role: "configuration", because: "settingsPages" });
|
|
103
|
+
return required;
|
|
104
|
+
}
|
|
105
|
+
// reference.json: the serialisable facts the generated Reference pages are
|
|
106
|
+
// rendered from (spec section 7). Written by `kardalum plugin build`. JSON
|
|
107
|
+
// schemas and field definitions are carried as plain data, never validated
|
|
108
|
+
// here beyond being JSON.
|
|
109
|
+
export const PluginReferenceSchema = z
|
|
110
|
+
.object({
|
|
111
|
+
actions: z.array(PluginActionDeclarationSchema),
|
|
112
|
+
roles: z.array(PluginRoleOfferSchema),
|
|
113
|
+
apiRoutes: z.array(z.object({ method: z.string(), path: z.string(), access: z.string(), action: z.string().optional() }).strict()),
|
|
114
|
+
capabilities: z.array(z.object({ id: z.string(), mediation: z.string(), payload: z.unknown().optional() }).strict()),
|
|
115
|
+
documentTypes: z.array(z.object({ name: z.string(), kind: z.string(), fields: z.array(z.unknown()) }).passthrough()),
|
|
116
|
+
dataTypes: z.array(z.object({ id: z.string(), name: z.string() }).passthrough()),
|
|
117
|
+
settingsPages: z.array(z.object({ id: z.string(), name: z.string(), action: z.string() }).strict()),
|
|
118
|
+
})
|
|
119
|
+
.strict();
|
|
120
|
+
export const REFERENCE_PAGE_SLUGS = ["permissions", "api-routes", "capabilities", "content", "settings"];
|
|
121
|
+
/** The generated pages this plugin gets, in their fixed order (spec section 7). */
|
|
122
|
+
export function referencePageSlugs(reference) {
|
|
123
|
+
const slugs = [];
|
|
124
|
+
if (reference.actions.length > 0 || reference.roles.length > 0)
|
|
125
|
+
slugs.push("permissions");
|
|
126
|
+
if (reference.apiRoutes.length > 0)
|
|
127
|
+
slugs.push("api-routes");
|
|
128
|
+
slugs.push("capabilities");
|
|
129
|
+
if (reference.documentTypes.length > 0 || reference.dataTypes.length > 0)
|
|
130
|
+
slugs.push("content");
|
|
131
|
+
if (reference.settingsPages.length > 0)
|
|
132
|
+
slugs.push("settings");
|
|
133
|
+
return slugs;
|
|
134
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A reverse-domain id such as "com.vendor.plugin": every segment is
|
|
3
|
+
* lowercase, starts with a letter, and uses only a-z, 0-9 and hyphens.
|
|
4
|
+
* Shared by manifest ids, datatype ids and plugin references, so it carries
|
|
5
|
+
* no segment count.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PLUGIN_ID_REGEX: RegExp;
|
|
8
|
+
/**
|
|
9
|
+
* The most segments a plugin manifest's own id may have: every action is the
|
|
10
|
+
* plugin id plus at least an object and a verb, and an action has at most
|
|
11
|
+
* ACTION_SEGMENT_MAX segments.
|
|
12
|
+
*/
|
|
13
|
+
export declare const MANIFEST_ID_SEGMENT_MAX: number;
|
|
14
|
+
/**
|
|
15
|
+
* Whether `id` is an id a plugin manifest may have: PLUGIN_ID_REGEX and at
|
|
16
|
+
* most MANIFEST_ID_SEGMENT_MAX segments, exactly what the SDK's manifest
|
|
17
|
+
* validator applies. Every door that turns a plugin id into a directory name
|
|
18
|
+
* (an install, an upload, a marketplace submission) runs this first, so an id
|
|
19
|
+
* the validator would refuse never reaches the filesystem: a lookalike such
|
|
20
|
+
* as "COM.KARDALUM.SEO" names another plugin's folder on a case-insensitive
|
|
21
|
+
* filesystem (S283).
|
|
22
|
+
*/
|
|
23
|
+
export declare function isPluginManifestId(id: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* A slot's id (S280): a segment of its screen's URL, so lowercase letters,
|
|
26
|
+
* digits and single hyphens only, which need no encoding and can never be
|
|
27
|
+
* read as "." or "..".
|
|
28
|
+
*/
|
|
29
|
+
export declare const SLOT_ID_REGEX: RegExp;
|
|
30
|
+
/** The longest a slot's id may be. */
|
|
31
|
+
export declare const SLOT_ID_MAX = 64;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ACTION_SEGMENT_MAX } from "./action.schema.js";
|
|
2
|
+
// The character rules for a plugin's id and for a slot's id, kept here so
|
|
3
|
+
// that the plugin SDK's manifest schema and the nav setting (S281) read one
|
|
4
|
+
// rule each and cannot drift apart. The SDK's manifest-schema.ts explains
|
|
5
|
+
// why each rule is what it is; it wraps these in its own messages.
|
|
6
|
+
/**
|
|
7
|
+
* A reverse-domain id such as "com.vendor.plugin": every segment is
|
|
8
|
+
* lowercase, starts with a letter, and uses only a-z, 0-9 and hyphens.
|
|
9
|
+
* Shared by manifest ids, datatype ids and plugin references, so it carries
|
|
10
|
+
* no segment count.
|
|
11
|
+
*/
|
|
12
|
+
export const PLUGIN_ID_REGEX = /^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/;
|
|
13
|
+
/**
|
|
14
|
+
* The most segments a plugin manifest's own id may have: every action is the
|
|
15
|
+
* plugin id plus at least an object and a verb, and an action has at most
|
|
16
|
+
* ACTION_SEGMENT_MAX segments.
|
|
17
|
+
*/
|
|
18
|
+
export const MANIFEST_ID_SEGMENT_MAX = ACTION_SEGMENT_MAX - 2;
|
|
19
|
+
/**
|
|
20
|
+
* Whether `id` is an id a plugin manifest may have: PLUGIN_ID_REGEX and at
|
|
21
|
+
* most MANIFEST_ID_SEGMENT_MAX segments, exactly what the SDK's manifest
|
|
22
|
+
* validator applies. Every door that turns a plugin id into a directory name
|
|
23
|
+
* (an install, an upload, a marketplace submission) runs this first, so an id
|
|
24
|
+
* the validator would refuse never reaches the filesystem: a lookalike such
|
|
25
|
+
* as "COM.KARDALUM.SEO" names another plugin's folder on a case-insensitive
|
|
26
|
+
* filesystem (S283).
|
|
27
|
+
*/
|
|
28
|
+
export function isPluginManifestId(id) {
|
|
29
|
+
return PLUGIN_ID_REGEX.test(id) && id.split(".").length <= MANIFEST_ID_SEGMENT_MAX;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A slot's id (S280): a segment of its screen's URL, so lowercase letters,
|
|
33
|
+
* digits and single hyphens only, which need no encoding and can never be
|
|
34
|
+
* read as "." or "..".
|
|
35
|
+
*/
|
|
36
|
+
export const SLOT_ID_REGEX = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
37
|
+
/** The longest a slot's id may be. */
|
|
38
|
+
export const SLOT_ID_MAX = 64;
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** S274b (spec D4): an offer on the installed-plugins list says whether a
|
|
3
|
+
* role with its id already exists, so the view can hide "Create role"
|
|
4
|
+
* without reading the roles list (which needs roles.read). */
|
|
5
|
+
export declare const ManagedPluginRoleOfferSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
label: z.ZodString;
|
|
8
|
+
actions: z.ZodArray<z.ZodString>;
|
|
9
|
+
created: z.ZodBoolean;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type ManagedPluginRoleOffer = z.infer<typeof ManagedPluginRoleOfferSchema>;
|
|
12
|
+
/** S284b: the marketplace's classification of an installed package that is
|
|
13
|
+
* not the one it delivered for the licence (the verdict's `tamper`). */
|
|
14
|
+
export declare const PluginTamperKindSchema: z.ZodEnum<{
|
|
15
|
+
"foreign-package": "foreign-package";
|
|
16
|
+
sideloaded: "sideloaded";
|
|
17
|
+
"modified-on-disk": "modified-on-disk";
|
|
18
|
+
}>;
|
|
19
|
+
export type PluginTamperKind = z.infer<typeof PluginTamperKindSchema>;
|
|
20
|
+
export declare const ManagedPluginSchema: z.ZodObject<{
|
|
21
|
+
pluginId: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
type: z.ZodString;
|
|
24
|
+
version: z.ZodString;
|
|
25
|
+
trustTier: z.ZodEnum<{
|
|
26
|
+
verified: "verified";
|
|
27
|
+
unverified: "unverified";
|
|
28
|
+
}>;
|
|
29
|
+
storageType: z.ZodEnum<{
|
|
30
|
+
simple: "simple";
|
|
31
|
+
structured: "structured";
|
|
32
|
+
}>;
|
|
33
|
+
enabled: z.ZodBoolean;
|
|
34
|
+
licenseStatus: z.ZodNullable<z.ZodString>;
|
|
35
|
+
licenseReason: z.ZodNullable<z.ZodString>;
|
|
36
|
+
licenseReasonDetail: z.ZodNullable<z.ZodString>;
|
|
37
|
+
licenseLastValidatedAt: z.ZodNullable<z.ZodString>;
|
|
38
|
+
licenseLastValidIssuedAt: z.ZodNullable<z.ZodString>;
|
|
39
|
+
licenseLastAttemptError: z.ZodNullable<z.ZodString>;
|
|
40
|
+
boundDomain: z.ZodNullable<z.ZodString>;
|
|
41
|
+
lockedFromEnabled: z.ZodNullable<z.ZodBoolean>;
|
|
42
|
+
tamperKind: z.ZodNullable<z.ZodEnum<{
|
|
43
|
+
"foreign-package": "foreign-package";
|
|
44
|
+
sideloaded: "sideloaded";
|
|
45
|
+
"modified-on-disk": "modified-on-disk";
|
|
46
|
+
}>>;
|
|
47
|
+
licenseLocked: z.ZodBoolean;
|
|
48
|
+
buyHref: z.ZodNullable<z.ZodString>;
|
|
49
|
+
roleOffers: z.ZodArray<z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
label: z.ZodString;
|
|
52
|
+
actions: z.ZodArray<z.ZodString>;
|
|
53
|
+
created: z.ZodBoolean;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
grantedRoleCount: z.ZodNumber;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type ManagedPlugin = z.infer<typeof ManagedPluginSchema>;
|
|
58
|
+
export declare const ManagedPluginListQuerySchema: z.ZodObject<{
|
|
59
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
60
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export declare const ManagedPluginListResponseSchema: z.ZodObject<{
|
|
63
|
+
items: z.ZodArray<z.ZodObject<{
|
|
64
|
+
pluginId: z.ZodString;
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
type: z.ZodString;
|
|
67
|
+
version: z.ZodString;
|
|
68
|
+
trustTier: z.ZodEnum<{
|
|
69
|
+
verified: "verified";
|
|
70
|
+
unverified: "unverified";
|
|
71
|
+
}>;
|
|
72
|
+
storageType: z.ZodEnum<{
|
|
73
|
+
simple: "simple";
|
|
74
|
+
structured: "structured";
|
|
75
|
+
}>;
|
|
76
|
+
enabled: z.ZodBoolean;
|
|
77
|
+
licenseStatus: z.ZodNullable<z.ZodString>;
|
|
78
|
+
licenseReason: z.ZodNullable<z.ZodString>;
|
|
79
|
+
licenseReasonDetail: z.ZodNullable<z.ZodString>;
|
|
80
|
+
licenseLastValidatedAt: z.ZodNullable<z.ZodString>;
|
|
81
|
+
licenseLastValidIssuedAt: z.ZodNullable<z.ZodString>;
|
|
82
|
+
licenseLastAttemptError: z.ZodNullable<z.ZodString>;
|
|
83
|
+
boundDomain: z.ZodNullable<z.ZodString>;
|
|
84
|
+
lockedFromEnabled: z.ZodNullable<z.ZodBoolean>;
|
|
85
|
+
tamperKind: z.ZodNullable<z.ZodEnum<{
|
|
86
|
+
"foreign-package": "foreign-package";
|
|
87
|
+
sideloaded: "sideloaded";
|
|
88
|
+
"modified-on-disk": "modified-on-disk";
|
|
89
|
+
}>>;
|
|
90
|
+
licenseLocked: z.ZodBoolean;
|
|
91
|
+
buyHref: z.ZodNullable<z.ZodString>;
|
|
92
|
+
roleOffers: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
label: z.ZodString;
|
|
95
|
+
actions: z.ZodArray<z.ZodString>;
|
|
96
|
+
created: z.ZodBoolean;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
grantedRoleCount: z.ZodNumber;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
101
|
+
licenseGraceDays: z.ZodNumber;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export type ManagedPluginListResponse = z.infer<typeof ManagedPluginListResponseSchema>;
|
|
104
|
+
export declare const PluginIdParamsSchema: z.ZodObject<{
|
|
105
|
+
pluginId: z.ZodString;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export declare const UninstallPluginBodySchema: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
108
|
+
confirmStructuredDataCleanup: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
+
}, z.core.$strip>>>;
|
|
110
|
+
export declare const UninstallConfirmationRequiredSchema: z.ZodObject<{
|
|
111
|
+
requiresConfirmation: z.ZodLiteral<true>;
|
|
112
|
+
snapshotGroupId: z.ZodString;
|
|
113
|
+
message: z.ZodString;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
export declare const BundleUninstallConfirmationRequiredSchema: z.ZodObject<{
|
|
116
|
+
requiresConfirmation: z.ZodLiteral<true>;
|
|
117
|
+
memberSnapshots: z.ZodArray<z.ZodObject<{
|
|
118
|
+
pluginId: z.ZodString;
|
|
119
|
+
snapshotGroupId: z.ZodString;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
message: z.ZodString;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
export declare const UninstallBlockedByDocumentTypesSchema: z.ZodObject<{
|
|
124
|
+
message: z.ZodString;
|
|
125
|
+
blockedBy: z.ZodArray<z.ZodObject<{
|
|
126
|
+
documentType: z.ZodString;
|
|
127
|
+
contentCount: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export type UninstallBlockedByDocumentTypes = z.infer<typeof UninstallBlockedByDocumentTypesSchema>;
|
|
131
|
+
export declare const UninstallSucceededSchema: z.ZodObject<{
|
|
132
|
+
snapshotGroupId: z.ZodNullable<z.ZodString>;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
export type UninstallSucceeded = z.infer<typeof UninstallSucceededSchema>;
|
|
135
|
+
export declare const BundleUninstallSucceededSchema: z.ZodObject<{
|
|
136
|
+
memberSnapshots: z.ZodArray<z.ZodObject<{
|
|
137
|
+
pluginId: z.ZodString;
|
|
138
|
+
snapshotGroupId: z.ZodString;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export type BundleUninstallSucceeded = z.infer<typeof BundleUninstallSucceededSchema>;
|
|
142
|
+
export declare const MarketplaceStatusResponseSchema: z.ZodObject<{
|
|
143
|
+
configured: z.ZodBoolean;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type MarketplaceStatusResponse = z.infer<typeof MarketplaceStatusResponseSchema>;
|
|
146
|
+
export declare const LicenseRecheckResponseSchema: z.ZodObject<{
|
|
147
|
+
pluginId: z.ZodString;
|
|
148
|
+
checked: z.ZodBoolean;
|
|
149
|
+
status: z.ZodNullable<z.ZodString>;
|
|
150
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
151
|
+
lastValidatedAt: z.ZodNullable<z.ZodString>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
export type LicenseRecheckResponse = z.infer<typeof LicenseRecheckResponseSchema>;
|
|
154
|
+
export declare const LicenseVerdictEnvelopeSchema: z.ZodObject<{
|
|
155
|
+
v: z.ZodLiteral<1>;
|
|
156
|
+
alg: z.ZodLiteral<"ed25519">;
|
|
157
|
+
typ: z.ZodLiteral<"license-verdict">;
|
|
158
|
+
keyId: z.ZodString;
|
|
159
|
+
keyHash: z.ZodString;
|
|
160
|
+
pluginId: z.ZodString;
|
|
161
|
+
domain: z.ZodString;
|
|
162
|
+
nonce: z.ZodString;
|
|
163
|
+
status: z.ZodEnum<{
|
|
164
|
+
invalid: "invalid";
|
|
165
|
+
valid: "valid";
|
|
166
|
+
revoked: "revoked";
|
|
167
|
+
}>;
|
|
168
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
169
|
+
issuedAt: z.ZodString;
|
|
170
|
+
tamper: z.ZodOptional<z.ZodEnum<{
|
|
171
|
+
"foreign-package": "foreign-package";
|
|
172
|
+
sideloaded: "sideloaded";
|
|
173
|
+
"modified-on-disk": "modified-on-disk";
|
|
174
|
+
}>>;
|
|
175
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
export type LicenseVerdictEnvelopeWire = z.infer<typeof LicenseVerdictEnvelopeSchema>;
|
|
178
|
+
export declare const EntitlementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
179
|
+
kind: z.ZodLiteral<"exempt">;
|
|
180
|
+
reason: z.ZodLiteral<"non-production">;
|
|
181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
182
|
+
kind: z.ZodLiteral<"verdict">;
|
|
183
|
+
envelope: z.ZodObject<{
|
|
184
|
+
v: z.ZodLiteral<1>;
|
|
185
|
+
alg: z.ZodLiteral<"ed25519">;
|
|
186
|
+
typ: z.ZodLiteral<"license-verdict">;
|
|
187
|
+
keyId: z.ZodString;
|
|
188
|
+
keyHash: z.ZodString;
|
|
189
|
+
pluginId: z.ZodString;
|
|
190
|
+
domain: z.ZodString;
|
|
191
|
+
nonce: z.ZodString;
|
|
192
|
+
status: z.ZodEnum<{
|
|
193
|
+
invalid: "invalid";
|
|
194
|
+
valid: "valid";
|
|
195
|
+
revoked: "revoked";
|
|
196
|
+
}>;
|
|
197
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
198
|
+
issuedAt: z.ZodString;
|
|
199
|
+
tamper: z.ZodOptional<z.ZodEnum<{
|
|
200
|
+
"foreign-package": "foreign-package";
|
|
201
|
+
sideloaded: "sideloaded";
|
|
202
|
+
"modified-on-disk": "modified-on-disk";
|
|
203
|
+
}>>;
|
|
204
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
signature: z.ZodString;
|
|
207
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
208
|
+
kind: z.ZodLiteral<"none">;
|
|
209
|
+
}, z.core.$strip>], "kind">;
|
|
210
|
+
export type EntitlementWire = z.infer<typeof EntitlementSchema>;
|
|
211
|
+
export declare const EntitlementResponseSchema: z.ZodObject<{
|
|
212
|
+
entitlement: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
213
|
+
kind: z.ZodLiteral<"exempt">;
|
|
214
|
+
reason: z.ZodLiteral<"non-production">;
|
|
215
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
216
|
+
kind: z.ZodLiteral<"verdict">;
|
|
217
|
+
envelope: z.ZodObject<{
|
|
218
|
+
v: z.ZodLiteral<1>;
|
|
219
|
+
alg: z.ZodLiteral<"ed25519">;
|
|
220
|
+
typ: z.ZodLiteral<"license-verdict">;
|
|
221
|
+
keyId: z.ZodString;
|
|
222
|
+
keyHash: z.ZodString;
|
|
223
|
+
pluginId: z.ZodString;
|
|
224
|
+
domain: z.ZodString;
|
|
225
|
+
nonce: z.ZodString;
|
|
226
|
+
status: z.ZodEnum<{
|
|
227
|
+
invalid: "invalid";
|
|
228
|
+
valid: "valid";
|
|
229
|
+
revoked: "revoked";
|
|
230
|
+
}>;
|
|
231
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
|
+
issuedAt: z.ZodString;
|
|
233
|
+
tamper: z.ZodOptional<z.ZodEnum<{
|
|
234
|
+
"foreign-package": "foreign-package";
|
|
235
|
+
sideloaded: "sideloaded";
|
|
236
|
+
"modified-on-disk": "modified-on-disk";
|
|
237
|
+
}>>;
|
|
238
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
239
|
+
}, z.core.$strip>;
|
|
240
|
+
signature: z.ZodString;
|
|
241
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
242
|
+
kind: z.ZodLiteral<"none">;
|
|
243
|
+
}, z.core.$strip>], "kind">;
|
|
244
|
+
valid: z.ZodBoolean;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
export type EntitlementResponse = z.infer<typeof EntitlementResponseSchema>;
|
|
247
|
+
export declare const EntitlementRefusalSchema: z.ZodObject<{
|
|
248
|
+
code: z.ZodLiteral<"entitlement">;
|
|
249
|
+
reason: z.ZodEnum<{
|
|
250
|
+
missing: "missing";
|
|
251
|
+
"invalid-signature": "invalid-signature";
|
|
252
|
+
"wrong-plugin": "wrong-plugin";
|
|
253
|
+
"not-valid": "not-valid";
|
|
254
|
+
expired: "expired";
|
|
255
|
+
}>;
|
|
256
|
+
message: z.ZodString;
|
|
257
|
+
}, z.core.$strip>;
|
|
258
|
+
export type EntitlementRefusal = z.infer<typeof EntitlementRefusalSchema>;
|
|
259
|
+
export declare const SnapshotGroupSchema: z.ZodObject<{
|
|
260
|
+
snapshotGroupId: z.ZodString;
|
|
261
|
+
takenAt: z.ZodString;
|
|
262
|
+
trigger: z.ZodNullable<z.ZodString>;
|
|
263
|
+
tableNames: z.ZodArray<z.ZodString>;
|
|
264
|
+
totalTableCount: z.ZodNumber;
|
|
265
|
+
status: z.ZodEnum<{
|
|
266
|
+
partial: "partial";
|
|
267
|
+
complete: "complete";
|
|
268
|
+
}>;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
export type SnapshotGroup = z.infer<typeof SnapshotGroupSchema>;
|
|
271
|
+
export declare const SnapshotGroupListQuerySchema: z.ZodObject<{
|
|
272
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
273
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
export declare const SnapshotGroupListResponseSchema: z.ZodObject<{
|
|
276
|
+
pluginId: z.ZodString;
|
|
277
|
+
items: z.ZodArray<z.ZodObject<{
|
|
278
|
+
snapshotGroupId: z.ZodString;
|
|
279
|
+
takenAt: z.ZodString;
|
|
280
|
+
trigger: z.ZodNullable<z.ZodString>;
|
|
281
|
+
tableNames: z.ZodArray<z.ZodString>;
|
|
282
|
+
totalTableCount: z.ZodNumber;
|
|
283
|
+
status: z.ZodEnum<{
|
|
284
|
+
partial: "partial";
|
|
285
|
+
complete: "complete";
|
|
286
|
+
}>;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
289
|
+
}, z.core.$strip>;
|
|
290
|
+
export type SnapshotGroupListResponse = z.infer<typeof SnapshotGroupListResponseSchema>;
|
|
291
|
+
export declare const RestorePlanEntrySchema: z.ZodObject<{
|
|
292
|
+
tableName: z.ZodString;
|
|
293
|
+
snapshotGroupId: z.ZodString;
|
|
294
|
+
groupTakenAt: z.ZodString;
|
|
295
|
+
}, z.core.$strip>;
|
|
296
|
+
export type RestorePlanEntry = z.infer<typeof RestorePlanEntrySchema>;
|
|
297
|
+
export declare const RestoreConfirmationRequiredSchema: z.ZodObject<{
|
|
298
|
+
requiresConfirmation: z.ZodLiteral<true>;
|
|
299
|
+
plan: z.ZodArray<z.ZodObject<{
|
|
300
|
+
tableName: z.ZodString;
|
|
301
|
+
snapshotGroupId: z.ZodString;
|
|
302
|
+
groupTakenAt: z.ZodString;
|
|
303
|
+
}, z.core.$strip>>;
|
|
304
|
+
planHash: z.ZodString;
|
|
305
|
+
message: z.ZodString;
|
|
306
|
+
}, z.core.$strip>;
|
|
307
|
+
export type RestoreConfirmationRequired = z.infer<typeof RestoreConfirmationRequiredSchema>;
|
|
308
|
+
export declare const RestoreSucceededSchema: z.ZodObject<{
|
|
309
|
+
preRestoreSnapshotGroupId: z.ZodNullable<z.ZodString>;
|
|
310
|
+
restoredTables: z.ZodArray<z.ZodString>;
|
|
311
|
+
}, z.core.$strip>;
|
|
312
|
+
export type RestoreSucceeded = z.infer<typeof RestoreSucceededSchema>;
|
|
313
|
+
export declare const RestoreBodySchema: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
314
|
+
confirmRestore: z.ZodOptional<z.ZodBoolean>;
|
|
315
|
+
planHash: z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, z.core.$strip>>>;
|
|
317
|
+
export declare const PluginUploadResponseSchema: z.ZodObject<{
|
|
318
|
+
pluginId: z.ZodString;
|
|
319
|
+
name: z.ZodString;
|
|
320
|
+
version: z.ZodString;
|
|
321
|
+
outcome: z.ZodEnum<{
|
|
322
|
+
updated: "updated";
|
|
323
|
+
installed: "installed";
|
|
324
|
+
}>;
|
|
325
|
+
fromVersion: z.ZodNullable<z.ZodString>;
|
|
326
|
+
trust: z.ZodLiteral<"unregistered">;
|
|
327
|
+
sampleContent: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
328
|
+
status: z.ZodLiteral<"none">;
|
|
329
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
330
|
+
status: z.ZodLiteral<"invalid">;
|
|
331
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
332
|
+
status: z.ZodLiteral<"already-present">;
|
|
333
|
+
path: z.ZodString;
|
|
334
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
335
|
+
status: z.ZodLiteral<"skipped">;
|
|
336
|
+
name: z.ZodString;
|
|
337
|
+
message: z.ZodString;
|
|
338
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
339
|
+
status: z.ZodLiteral<"added">;
|
|
340
|
+
count: z.ZodNumber;
|
|
341
|
+
}, z.core.$strip>], "status">>;
|
|
342
|
+
}, z.core.$strip>;
|
|
343
|
+
export type PluginUploadResponse = z.infer<typeof PluginUploadResponseSchema>;
|
|
344
|
+
/** S274c: the upload's confirmation travels as a query flag because the
|
|
345
|
+
* route reads only the multipart file part. */
|
|
346
|
+
export declare const PluginUploadQuerySchema: z.ZodObject<{
|
|
347
|
+
confirmTrustDowngrade: z.ZodOptional<z.ZodEnum<{
|
|
348
|
+
true: "true";
|
|
349
|
+
false: "false";
|
|
350
|
+
}>>;
|
|
351
|
+
}, z.core.$strip>;
|
|
352
|
+
export type PluginUploadQuery = z.infer<typeof PluginUploadQuerySchema>;
|
|
353
|
+
/** The 400 an upload answers when the package fails the listing contract
|
|
354
|
+
* (README, cover and docs pages): every violation, one entry each, and
|
|
355
|
+
* `message` as the same list on one line for a caller that shows one. */
|
|
356
|
+
export declare const PackageRefusedSchema: z.ZodObject<{
|
|
357
|
+
message: z.ZodString;
|
|
358
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
359
|
+
}, z.core.$strip>;
|
|
360
|
+
export type PackageRefused = z.infer<typeof PackageRefusedSchema>;
|
|
361
|
+
/** S274c: the 409 an upload over a verified plugin answers before it stores
|
|
362
|
+
* anything, until the retry carries confirmTrustDowngrade=true. */
|
|
363
|
+
export declare const TrustDowngradeConfirmationSchema: z.ZodObject<{
|
|
364
|
+
requiresConfirmation: z.ZodLiteral<true>;
|
|
365
|
+
reason: z.ZodLiteral<"trust-downgrade">;
|
|
366
|
+
pluginName: z.ZodString;
|
|
367
|
+
message: z.ZodString;
|
|
368
|
+
}, z.core.$strip>;
|
|
369
|
+
export type TrustDowngradeConfirmation = z.infer<typeof TrustDowngradeConfirmationSchema>;
|