@kardalum/plugin-sdk 0.15.0 → 0.17.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 +49 -1
- package/README.md +10 -0
- package/dist/admin-section-registry.d.ts +14 -5
- package/dist/admin-section-registry.js +14 -4
- package/dist/built-in-value-schemas.js +1 -1
- package/dist/built-ins.js +2 -2
- package/dist/capabilities.d.ts +8 -78
- package/dist/capabilities.js +23 -322
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +13 -12
- package/dist/license-verdict-keys.d.ts +4 -3
- package/dist/license-verdict-keys.js +6 -5
- package/dist/manifest-entry.d.ts +3 -3
- package/dist/manifest-entry.js +2 -2
- package/dist/manifest-schema.d.ts +113 -56
- package/dist/manifest-schema.js +192 -295
- package/dist/manifest.d.ts +145 -112
- package/dist/manifest.js +13 -36
- package/dist/media/media-picker.js +21 -12
- package/dist/media/upload-error.d.ts +1 -1
- package/dist/media/upload-error.js +1 -1
- package/dist/plugin-context.d.ts +7 -0
- package/dist/plugin-context.js +7 -0
- package/dist/plugin-screen-context.d.ts +44 -3
- package/dist/plugin-screen-context.js +27 -2
- package/dist/read-all-pages.d.ts +23 -0
- package/dist/read-all-pages.js +30 -0
- package/dist/richtext/block-panel.js +6 -6
- package/dist/richtext/insert-menu.js +4 -4
- package/dist/richtext/style-listbox.js +4 -4
- package/dist/tokens/tokens.css +1 -0
- package/dist/tokens/tokens.json +2 -1
- package/dist/type-equality.d.ts +2 -0
- package/dist/type-equality.js +1 -0
- package/dist/views/content-list-view.js +2 -2
- package/dist/views/html-view.js +1 -1
- package/dist/views/image-view.js +24 -39
- package/dist/views/rich-text-view.js +3 -3
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +43 -25
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +60 -8
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +33 -2
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.d.ts +22 -1
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.js +50 -15
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +134 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +18 -13
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +11 -7
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +2 -1
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +143 -57
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +110 -60
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +67 -40
- package/node_modules/@kardalum/api-schemas/dist/index.js +35 -19
- package/node_modules/@kardalum/api-schemas/dist/install-warnings.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/install-warnings.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/issue-list.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/issue-list.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +73 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +104 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +356 -16
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +93 -10
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +38 -30
- package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.js +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +6 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +8 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +69 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +76 -9
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +84 -24
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +17 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +18 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +59 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +597 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +503 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +116 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +82 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +33 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +28 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +11 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +17 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +58 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +198 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-fields.d.ts +64 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-fields.js +134 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-template-payload.d.ts +74 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-template-payload.js +132 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-vocabulary.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-vocabulary.js +15 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +23 -4
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +17 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +97 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +126 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +70 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +36 -6
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +17 -5
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.d.ts +52 -33
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +195 -56
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +19 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/strict-url.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/strict-url.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +105 -1
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +47 -7
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +30 -2
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +19 -5
- package/node_modules/@kardalum/api-schemas/dist/trash-cursor.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-cursor.schema.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +15 -3
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/whoami-api.schema.d.ts +19 -0
- package/node_modules/@kardalum/api-schemas/dist/whoami-api.schema.js +22 -0
- package/node_modules/@kardalum/api-schemas/package.json +2 -2
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +3 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +2 -1
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/README.md +4 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +96 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +66 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +103 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +346 -0
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +4 -0
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +25 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +25 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +203 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +73 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +60 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icon-names.generated.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icon-names.generated.js +2052 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +51 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +8 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +7 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +119 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +14 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +21 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +148 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/package-files.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/package-files.js +76 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.d.ts +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +133 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +90 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/support.d.ts +24 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/support.js +55 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +158 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +53 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.js +1 -0
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.d.ts +3 -2
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.js +4 -2
- package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +92 -3
- package/node_modules/@kardalum/plugin-package/dist/extract.js +251 -41
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +11 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +8 -2
- package/node_modules/@kardalum/plugin-package/dist/manifest-entry.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/manifest-entry.js +20 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.js +7 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +38 -1
- package/node_modules/@kardalum/plugin-package/dist/sample-content.js +84 -16
- package/node_modules/@kardalum/plugin-package/dist/shipped-files.d.ts +39 -0
- package/node_modules/@kardalum/plugin-package/dist/shipped-files.js +133 -0
- package/node_modules/@kardalum/plugin-package/dist/shipped-locales.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/shipped-locales.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/types.d.ts +4 -6
- package/node_modules/@kardalum/plugin-package/dist/types.js +15 -1
- package/node_modules/@kardalum/plugin-package/package.json +9 -2
- package/node_modules/@kardalum/ui/dist/components/checkbox.js +2 -2
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +2 -2
- package/node_modules/@kardalum/ui/dist/components/property-field.js +4 -1
- package/node_modules/@kardalum/ui/package.json +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type PluginLabel } from "./plugin-labels.js";
|
|
3
|
+
/** The most steps one declaration may have. */
|
|
4
|
+
export declare const INSTALL_MAX_STEPS = 16;
|
|
5
|
+
/** The most options one step may ask. */
|
|
6
|
+
export declare const INSTALL_MAX_OPTIONS_PER_STEP = 32;
|
|
7
|
+
/** The most choices one select or multi-select option may offer. */
|
|
8
|
+
export declare const INSTALL_MAX_CHOICES_PER_OPTION = 64;
|
|
9
|
+
/** The longest a label's text may be, per language. */
|
|
10
|
+
export declare const INSTALL_LABEL_MAX_LENGTH = 120;
|
|
11
|
+
/** The longest a description's text may be, per language. */
|
|
12
|
+
export declare const INSTALL_DESCRIPTION_MAX_LENGTH = 500;
|
|
13
|
+
/** The most languages one label or description may carry: every label map's
|
|
14
|
+
* bound (plugin-labels.ts). */
|
|
15
|
+
export declare const INSTALL_LABEL_MAX_LANGUAGES = 32;
|
|
16
|
+
/** The longest language code a label's key may be: DocsLanguageSchema's
|
|
17
|
+
* bound, checked before the culture pattern ever sees the key. */
|
|
18
|
+
export declare const INSTALL_LABEL_KEY_MAX_LENGTH = 35;
|
|
19
|
+
/** The most option answers one answers object may carry: every option of a full declaration. */
|
|
20
|
+
export declare const INSTALL_MAX_OPTION_ANSWERS: number;
|
|
21
|
+
/** The most offered roles one answers object may name. */
|
|
22
|
+
export declare const INSTALL_MAX_ROLE_ANSWERS = 64;
|
|
23
|
+
export declare const INSTALL_OPTION_KINDS: readonly ["boolean", "select", "multiSelect"];
|
|
24
|
+
export type InstallOptionKind = (typeof INSTALL_OPTION_KINDS)[number];
|
|
25
|
+
export declare const InstallLabelSchema: z.ZodPreprocess<z.ZodObject<{
|
|
26
|
+
en: z.ZodString;
|
|
27
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
28
|
+
export type InstallLabel = z.infer<typeof InstallLabelSchema>;
|
|
29
|
+
export declare const InstallDescriptionSchema: z.ZodPreprocess<z.ZodObject<{
|
|
30
|
+
en: z.ZodString;
|
|
31
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
32
|
+
export type InstallDescription = z.infer<typeof InstallDescriptionSchema>;
|
|
33
|
+
/** A step's, an option's or a choice's id: the slot id rule, so an id needs
|
|
34
|
+
* no encoding anywhere it travels and can never be "." or "..". */
|
|
35
|
+
export declare const InstallIdSchema: z.ZodString;
|
|
36
|
+
declare const InstallChoiceSchema: z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
39
|
+
en: z.ZodString;
|
|
40
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
41
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
42
|
+
en: z.ZodString;
|
|
43
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
export type InstallChoice = z.infer<typeof InstallChoiceSchema>;
|
|
46
|
+
/** One question. A select with no default must be answered unless it says
|
|
47
|
+
* `required: false`; a select with a default is never required. */
|
|
48
|
+
export declare const InstallOptionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
49
|
+
kind: z.ZodLiteral<"boolean">;
|
|
50
|
+
default: z.ZodBoolean;
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
53
|
+
en: z.ZodString;
|
|
54
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
55
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
56
|
+
en: z.ZodString;
|
|
57
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
58
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
59
|
+
kind: z.ZodLiteral<"select">;
|
|
60
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
63
|
+
en: z.ZodString;
|
|
64
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
65
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
66
|
+
en: z.ZodString;
|
|
67
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
68
|
+
}, z.core.$strict>>;
|
|
69
|
+
default: z.ZodOptional<z.ZodString>;
|
|
70
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
id: z.ZodString;
|
|
72
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
73
|
+
en: z.ZodString;
|
|
74
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
75
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
76
|
+
en: z.ZodString;
|
|
77
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
78
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"multiSelect">;
|
|
80
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
81
|
+
id: z.ZodString;
|
|
82
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
83
|
+
en: z.ZodString;
|
|
84
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
85
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
86
|
+
en: z.ZodString;
|
|
87
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
88
|
+
}, z.core.$strict>>;
|
|
89
|
+
default: z.ZodArray<z.ZodString>;
|
|
90
|
+
id: z.ZodString;
|
|
91
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
92
|
+
en: z.ZodString;
|
|
93
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
94
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
95
|
+
en: z.ZodString;
|
|
96
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
97
|
+
}, z.core.$strict>], "kind">;
|
|
98
|
+
export type InstallOption = z.infer<typeof InstallOptionSchema>;
|
|
99
|
+
export declare const InstallStepSchema: z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
102
|
+
en: z.ZodString;
|
|
103
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
104
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
105
|
+
en: z.ZodString;
|
|
106
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
107
|
+
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
108
|
+
kind: z.ZodLiteral<"boolean">;
|
|
109
|
+
default: z.ZodBoolean;
|
|
110
|
+
id: z.ZodString;
|
|
111
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
112
|
+
en: z.ZodString;
|
|
113
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
114
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
115
|
+
en: z.ZodString;
|
|
116
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
117
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
118
|
+
kind: z.ZodLiteral<"select">;
|
|
119
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
120
|
+
id: z.ZodString;
|
|
121
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
122
|
+
en: z.ZodString;
|
|
123
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
124
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
125
|
+
en: z.ZodString;
|
|
126
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
127
|
+
}, z.core.$strict>>;
|
|
128
|
+
default: z.ZodOptional<z.ZodString>;
|
|
129
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
id: z.ZodString;
|
|
131
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
132
|
+
en: z.ZodString;
|
|
133
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
134
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
135
|
+
en: z.ZodString;
|
|
136
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
137
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
138
|
+
kind: z.ZodLiteral<"multiSelect">;
|
|
139
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
140
|
+
id: z.ZodString;
|
|
141
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
142
|
+
en: z.ZodString;
|
|
143
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
144
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
145
|
+
en: z.ZodString;
|
|
146
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
147
|
+
}, z.core.$strict>>;
|
|
148
|
+
default: z.ZodArray<z.ZodString>;
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
151
|
+
en: z.ZodString;
|
|
152
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
153
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
154
|
+
en: z.ZodString;
|
|
155
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
156
|
+
}, z.core.$strict>], "kind">>;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
export type InstallStep = z.infer<typeof InstallStepSchema>;
|
|
159
|
+
/** The manifest's `install`: the steps the install asks, in order. */
|
|
160
|
+
export declare const PluginInstallDeclarationSchema: z.ZodObject<{
|
|
161
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
162
|
+
id: z.ZodString;
|
|
163
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
164
|
+
en: z.ZodString;
|
|
165
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
166
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
167
|
+
en: z.ZodString;
|
|
168
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
169
|
+
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
170
|
+
kind: z.ZodLiteral<"boolean">;
|
|
171
|
+
default: z.ZodBoolean;
|
|
172
|
+
id: z.ZodString;
|
|
173
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
174
|
+
en: z.ZodString;
|
|
175
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
176
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
177
|
+
en: z.ZodString;
|
|
178
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
179
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
180
|
+
kind: z.ZodLiteral<"select">;
|
|
181
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
182
|
+
id: z.ZodString;
|
|
183
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
184
|
+
en: z.ZodString;
|
|
185
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
186
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
187
|
+
en: z.ZodString;
|
|
188
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
189
|
+
}, z.core.$strict>>;
|
|
190
|
+
default: z.ZodOptional<z.ZodString>;
|
|
191
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
194
|
+
en: z.ZodString;
|
|
195
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
196
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
197
|
+
en: z.ZodString;
|
|
198
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
199
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
200
|
+
kind: z.ZodLiteral<"multiSelect">;
|
|
201
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
202
|
+
id: z.ZodString;
|
|
203
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
204
|
+
en: z.ZodString;
|
|
205
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
206
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
207
|
+
en: z.ZodString;
|
|
208
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
209
|
+
}, z.core.$strict>>;
|
|
210
|
+
default: z.ZodArray<z.ZodString>;
|
|
211
|
+
id: z.ZodString;
|
|
212
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
213
|
+
en: z.ZodString;
|
|
214
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
215
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
216
|
+
en: z.ZodString;
|
|
217
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
218
|
+
}, z.core.$strict>], "kind">>;
|
|
219
|
+
}, z.core.$strict>>;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
export type PluginInstallDeclaration = z.infer<typeof PluginInstallDeclarationSchema>;
|
|
222
|
+
export interface InstallDeclarationIssue {
|
|
223
|
+
path: (string | number)[];
|
|
224
|
+
message: string;
|
|
225
|
+
}
|
|
226
|
+
/** Whether an option must be answered: a select with no default, unless it
|
|
227
|
+
* says `required: false`. buildReference (@kardalum/plugin-package) writes
|
|
228
|
+
* the same rule inline, and its test pins the two together. */
|
|
229
|
+
export declare function installOptionNeedsAnswer(option: InstallOption): boolean;
|
|
230
|
+
/** The rules over a parsed declaration that its shape cannot express: the
|
|
231
|
+
* caps, distinct ids (option ids across every step, because each keys its
|
|
232
|
+
* answer), defaults among the choices. Paths are rooted at `install`. */
|
|
233
|
+
export declare function checkInstallDeclaration(install: PluginInstallDeclaration): InstallDeclarationIssue[];
|
|
234
|
+
/** One option's answer: true or false, a choice id, or a list of choice ids. */
|
|
235
|
+
export declare const InstallAnswerValueSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
236
|
+
export type InstallAnswerValue = z.infer<typeof InstallAnswerValueSchema>;
|
|
237
|
+
/** The answers object every install path takes. Strict, so a misspelt key is
|
|
238
|
+
* refused rather than ignored; read by resolveInstallAnswers. */
|
|
239
|
+
export declare const InstallAnswersSchema: z.ZodObject<{
|
|
240
|
+
sampleContent: z.ZodOptional<z.ZodBoolean>;
|
|
241
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
242
|
+
options: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>>, unknown>>;
|
|
243
|
+
}, z.core.$strict>;
|
|
244
|
+
export type InstallAnswers = z.infer<typeof InstallAnswersSchema>;
|
|
245
|
+
/** The answers with every default filled: what onInstall and onUpdate are
|
|
246
|
+
* told, and what S293 records on the registry row. */
|
|
247
|
+
export declare const ResolvedInstallAnswersSchema: z.ZodObject<{
|
|
248
|
+
sampleContent: z.ZodBoolean;
|
|
249
|
+
roles: z.ZodArray<z.ZodString>;
|
|
250
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
251
|
+
}, z.core.$strict>;
|
|
252
|
+
export type ResolvedInstallAnswers = z.infer<typeof ResolvedInstallAnswersSchema>;
|
|
253
|
+
/** What a package carries that the built-in questions are derived from.
|
|
254
|
+
* readShippedInstallFacts (@kardalum/plugin-package) reads it from a package
|
|
255
|
+
* directory. */
|
|
256
|
+
export interface ShippedInstallFacts {
|
|
257
|
+
/** A sample-content.json the seeder can read ships at the package root. */
|
|
258
|
+
sampleContent: boolean;
|
|
259
|
+
/** That file's own words for the sample, when it gives any. */
|
|
260
|
+
sampleContentDescription?: InstallDescription;
|
|
261
|
+
}
|
|
262
|
+
/** What resolveInstallAnswers reads from a manifest, the live one or
|
|
263
|
+
* manifest.json. */
|
|
264
|
+
export interface InstallAnswersManifest {
|
|
265
|
+
install?: PluginInstallDeclaration;
|
|
266
|
+
roles?: ReadonlyArray<{
|
|
267
|
+
id: string;
|
|
268
|
+
}>;
|
|
269
|
+
}
|
|
270
|
+
export interface InstallAnswerIssue {
|
|
271
|
+
path: (string | number)[];
|
|
272
|
+
message: string;
|
|
273
|
+
}
|
|
274
|
+
export type InstallAnswersResult = {
|
|
275
|
+
ok: true;
|
|
276
|
+
answers: ResolvedInstallAnswers;
|
|
277
|
+
} | {
|
|
278
|
+
ok: false;
|
|
279
|
+
issues: InstallAnswerIssue[];
|
|
280
|
+
};
|
|
281
|
+
/** The answers with every default filled, or every reason they cannot be:
|
|
282
|
+
* the sample content first, then the roles in answer order, then option
|
|
283
|
+
* keys the declaration lacks in answer order, then the declared options in
|
|
284
|
+
* declaration order. `answers` has passed InstallAnswersSchema (a door's
|
|
285
|
+
* body schema); its options are read as own properties only. The
|
|
286
|
+
* manifest's declaration has passed checkInstallDeclaration (the SDK's
|
|
287
|
+
* manifest schema runs it, and so does parseInstallAnswersManifest): an
|
|
288
|
+
* option id declared twice would otherwise resolve against its last
|
|
289
|
+
* declaration alone. */
|
|
290
|
+
export declare function resolveInstallAnswers(manifest: InstallAnswersManifest, shipped: ShippedInstallFacts, answers: InstallAnswers): InstallAnswersResult;
|
|
291
|
+
/** What a door reads from manifest.json (or the live manifest) to resolve
|
|
292
|
+
* answers. Not strict: a manifest's other keys are allowed and left out of
|
|
293
|
+
* the result. */
|
|
294
|
+
export declare const InstallAnswersManifestSchema: z.ZodObject<{
|
|
295
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
296
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
297
|
+
id: z.ZodString;
|
|
298
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
299
|
+
en: z.ZodString;
|
|
300
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
301
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
302
|
+
en: z.ZodString;
|
|
303
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
304
|
+
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
305
|
+
kind: z.ZodLiteral<"boolean">;
|
|
306
|
+
default: z.ZodBoolean;
|
|
307
|
+
id: z.ZodString;
|
|
308
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
309
|
+
en: z.ZodString;
|
|
310
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
311
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
312
|
+
en: z.ZodString;
|
|
313
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
314
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
315
|
+
kind: z.ZodLiteral<"select">;
|
|
316
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
317
|
+
id: z.ZodString;
|
|
318
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
319
|
+
en: z.ZodString;
|
|
320
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
321
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
322
|
+
en: z.ZodString;
|
|
323
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
324
|
+
}, z.core.$strict>>;
|
|
325
|
+
default: z.ZodOptional<z.ZodString>;
|
|
326
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
327
|
+
id: z.ZodString;
|
|
328
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
329
|
+
en: z.ZodString;
|
|
330
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
331
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
332
|
+
en: z.ZodString;
|
|
333
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
334
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
335
|
+
kind: z.ZodLiteral<"multiSelect">;
|
|
336
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
337
|
+
id: z.ZodString;
|
|
338
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
339
|
+
en: z.ZodString;
|
|
340
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
341
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
342
|
+
en: z.ZodString;
|
|
343
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
344
|
+
}, z.core.$strict>>;
|
|
345
|
+
default: z.ZodArray<z.ZodString>;
|
|
346
|
+
id: z.ZodString;
|
|
347
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
348
|
+
en: z.ZodString;
|
|
349
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
350
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
351
|
+
en: z.ZodString;
|
|
352
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
353
|
+
}, z.core.$strict>], "kind">>;
|
|
354
|
+
}, z.core.$strict>>;
|
|
355
|
+
}, z.core.$strict>>;
|
|
356
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
357
|
+
id: z.ZodString;
|
|
358
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
359
|
+
en: z.ZodString;
|
|
360
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
361
|
+
actions: z.ZodArray<z.ZodString>;
|
|
362
|
+
}, z.core.$strip>>>;
|
|
363
|
+
}, z.core.$strip>;
|
|
364
|
+
export type ParsedInstallAnswersManifest = {
|
|
365
|
+
ok: true;
|
|
366
|
+
manifest: InstallAnswersManifest;
|
|
367
|
+
} | {
|
|
368
|
+
ok: false;
|
|
369
|
+
issues: InstallAnswerIssue[];
|
|
370
|
+
};
|
|
371
|
+
/** A manifest nothing has validated yet, read for its answers: the shape first,
|
|
372
|
+
* then checkInstallDeclaration on a declaration that parsed (S292 C7), because
|
|
373
|
+
* the resolvers trust the declaration they are given. */
|
|
374
|
+
export declare function parseInstallAnswersManifest(raw: unknown): ParsedInstallAnswersManifest;
|
|
375
|
+
/** A declaration's steps, each keeping only the options the recorded answers
|
|
376
|
+
* do not cover (no recorded answer, or one the option no longer accepts); a
|
|
377
|
+
* step left with none is dropped. No record covers nothing. */
|
|
378
|
+
export declare function stepsNotCoveredBy(steps: readonly InstallStep[], recorded: ResolvedInstallAnswers | null): InstallStep[];
|
|
379
|
+
/** An update's answers (2026-10-13-s293-the-wizard-installed-design.md 3.5):
|
|
380
|
+
* the record's sample choice, the recorded roles the new version still
|
|
381
|
+
* offers, each covered option's recorded answer (a copy), and every other
|
|
382
|
+
* declared option resolved from the request's answer or its default. Every
|
|
383
|
+
* refusal at once: the sample content, the roles, the request's option keys
|
|
384
|
+
* in answer order, then the declared options in declaration order. `given`
|
|
385
|
+
* and the declaration are held to what resolveInstallAnswers assumes;
|
|
386
|
+
* `recorded` is the row's record read through readInstallRecord, or null
|
|
387
|
+
* for a plugin installed before S293. */
|
|
388
|
+
export declare function resolveUpdateAnswers(manifest: InstallAnswersManifest, recorded: ResolvedInstallAnswers | null, given: InstallAnswers): InstallAnswersResult;
|
|
389
|
+
/** What installing does whatever the answers, in the order the install
|
|
390
|
+
* applies it, structured storage last (it is what an uninstall must
|
|
391
|
+
* snapshot). */
|
|
392
|
+
export declare const INSTALL_CONSENT_IDS: readonly ["migrations", "documentTypes", "actions", "templates", "assets", "structuredStorage"];
|
|
393
|
+
export type InstallConsentId = (typeof INSTALL_CONSENT_IDS)[number];
|
|
394
|
+
/** The install interface: what a screen shows and a script answers, before
|
|
395
|
+
* anything is installed. The marketplace stores it per version and its
|
|
396
|
+
* listing API carries it to the admin. A consent id is an open string on
|
|
397
|
+
* the wire, as a capability id is (MarketplaceCapabilitySchema): a newer
|
|
398
|
+
* marketplace's new item reaches an older admin as an id it has no words
|
|
399
|
+
* for, not as a listing that fails to parse. Option kinds stay closed: a CMS
|
|
400
|
+
* whose SDK does not know a kind refuses that plugin's manifest anyway. */
|
|
401
|
+
export declare const InstallInterfaceSchema: z.ZodObject<{
|
|
402
|
+
consent: z.ZodArray<z.ZodObject<{
|
|
403
|
+
id: z.ZodString;
|
|
404
|
+
details: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
405
|
+
en: z.ZodString;
|
|
406
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
407
|
+
}, z.core.$strict>>;
|
|
408
|
+
sampleContent: z.ZodNullable<z.ZodObject<{
|
|
409
|
+
default: z.ZodLiteral<true>;
|
|
410
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
411
|
+
en: z.ZodString;
|
|
412
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
413
|
+
}, z.core.$strict>>;
|
|
414
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
415
|
+
id: z.ZodString;
|
|
416
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
417
|
+
en: z.ZodString;
|
|
418
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
419
|
+
actions: z.ZodArray<z.ZodString>;
|
|
420
|
+
default: z.ZodLiteral<false>;
|
|
421
|
+
}, z.core.$strict>>;
|
|
422
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
423
|
+
id: z.ZodString;
|
|
424
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
425
|
+
en: z.ZodString;
|
|
426
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
427
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
428
|
+
en: z.ZodString;
|
|
429
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
430
|
+
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
431
|
+
kind: z.ZodLiteral<"boolean">;
|
|
432
|
+
default: z.ZodBoolean;
|
|
433
|
+
id: z.ZodString;
|
|
434
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
435
|
+
en: z.ZodString;
|
|
436
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
437
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
438
|
+
en: z.ZodString;
|
|
439
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
440
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
441
|
+
kind: z.ZodLiteral<"select">;
|
|
442
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
443
|
+
id: z.ZodString;
|
|
444
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
445
|
+
en: z.ZodString;
|
|
446
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
447
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
448
|
+
en: z.ZodString;
|
|
449
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
450
|
+
}, z.core.$strict>>;
|
|
451
|
+
default: z.ZodOptional<z.ZodString>;
|
|
452
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
453
|
+
id: z.ZodString;
|
|
454
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
455
|
+
en: z.ZodString;
|
|
456
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
457
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
458
|
+
en: z.ZodString;
|
|
459
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
460
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
461
|
+
kind: z.ZodLiteral<"multiSelect">;
|
|
462
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
463
|
+
id: z.ZodString;
|
|
464
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
465
|
+
en: z.ZodString;
|
|
466
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
467
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
468
|
+
en: z.ZodString;
|
|
469
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
470
|
+
}, z.core.$strict>>;
|
|
471
|
+
default: z.ZodArray<z.ZodString>;
|
|
472
|
+
id: z.ZodString;
|
|
473
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
474
|
+
en: z.ZodString;
|
|
475
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
476
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
477
|
+
en: z.ZodString;
|
|
478
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
479
|
+
}, z.core.$strict>], "kind">>;
|
|
480
|
+
}, z.core.$strict>>;
|
|
481
|
+
}, z.core.$strict>;
|
|
482
|
+
export type InstallInterface = z.infer<typeof InstallInterfaceSchema>;
|
|
483
|
+
/** InstallInterfaceSchema as the listing wire carries it, from the
|
|
484
|
+
* marketplace's detail API through a CMS's proxy to its admin. The two are
|
|
485
|
+
* deployed and versioned apart, so a key a newer marketplace adds is
|
|
486
|
+
* dropped here rather than refused: refused, it would fail an older CMS's
|
|
487
|
+
* response validation and turn the whole listing into an error. Unknown
|
|
488
|
+
* keys are dropped on the interface, its consent items, its sample content
|
|
489
|
+
* and its roles; the steps stay on the closed InstallStepSchema (D15),
|
|
490
|
+
* because a step an older SDK cannot read belongs to a plugin that CMS
|
|
491
|
+
* refuses at install anyway. */
|
|
492
|
+
export declare const InstallInterfaceWireSchema: z.ZodObject<{
|
|
493
|
+
consent: z.ZodArray<z.ZodObject<{
|
|
494
|
+
id: z.ZodString;
|
|
495
|
+
details: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
496
|
+
en: z.ZodString;
|
|
497
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>>;
|
|
498
|
+
}, z.core.$strip>>;
|
|
499
|
+
sampleContent: z.ZodNullable<z.ZodObject<{
|
|
500
|
+
default: z.ZodLiteral<true>;
|
|
501
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
502
|
+
en: z.ZodString;
|
|
503
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
504
|
+
}, z.core.$strip>>;
|
|
505
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
506
|
+
id: z.ZodString;
|
|
507
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
508
|
+
en: z.ZodString;
|
|
509
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
510
|
+
actions: z.ZodArray<z.ZodString>;
|
|
511
|
+
default: z.ZodLiteral<false>;
|
|
512
|
+
}, z.core.$strip>>;
|
|
513
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
514
|
+
id: z.ZodString;
|
|
515
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
516
|
+
en: z.ZodString;
|
|
517
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
518
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
519
|
+
en: z.ZodString;
|
|
520
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
521
|
+
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
522
|
+
kind: z.ZodLiteral<"boolean">;
|
|
523
|
+
default: z.ZodBoolean;
|
|
524
|
+
id: z.ZodString;
|
|
525
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
526
|
+
en: z.ZodString;
|
|
527
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
528
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
529
|
+
en: z.ZodString;
|
|
530
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
531
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
532
|
+
kind: z.ZodLiteral<"select">;
|
|
533
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
534
|
+
id: z.ZodString;
|
|
535
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
536
|
+
en: z.ZodString;
|
|
537
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
538
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
539
|
+
en: z.ZodString;
|
|
540
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
541
|
+
}, z.core.$strict>>;
|
|
542
|
+
default: z.ZodOptional<z.ZodString>;
|
|
543
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
544
|
+
id: z.ZodString;
|
|
545
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
546
|
+
en: z.ZodString;
|
|
547
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
548
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
549
|
+
en: z.ZodString;
|
|
550
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
551
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
552
|
+
kind: z.ZodLiteral<"multiSelect">;
|
|
553
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
554
|
+
id: z.ZodString;
|
|
555
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
556
|
+
en: z.ZodString;
|
|
557
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
558
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
559
|
+
en: z.ZodString;
|
|
560
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
561
|
+
}, z.core.$strict>>;
|
|
562
|
+
default: z.ZodArray<z.ZodString>;
|
|
563
|
+
id: z.ZodString;
|
|
564
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
565
|
+
en: z.ZodString;
|
|
566
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
567
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
568
|
+
en: z.ZodString;
|
|
569
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
570
|
+
}, z.core.$strict>], "kind">>;
|
|
571
|
+
}, z.core.$strict>>;
|
|
572
|
+
}, z.core.$strip>;
|
|
573
|
+
export type InstallInterfaceWire = z.infer<typeof InstallInterfaceWireSchema>;
|
|
574
|
+
/** What installInterfaceFor reads: the live manifest or manifest.json's
|
|
575
|
+
* redacted form (where migrations are ids). The consent facts are read
|
|
576
|
+
* defensively, as deriveCapabilities reads them. */
|
|
577
|
+
export interface InstallInterfaceManifest {
|
|
578
|
+
install?: PluginInstallDeclaration;
|
|
579
|
+
roles?: ReadonlyArray<{
|
|
580
|
+
id: string;
|
|
581
|
+
label: PluginLabel;
|
|
582
|
+
actions: ReadonlyArray<string>;
|
|
583
|
+
}>;
|
|
584
|
+
actions?: ReadonlyArray<{
|
|
585
|
+
id: string;
|
|
586
|
+
label: PluginLabel;
|
|
587
|
+
}>;
|
|
588
|
+
migrations?: unknown;
|
|
589
|
+
databaseCompatibility?: unknown;
|
|
590
|
+
contributions?: unknown;
|
|
591
|
+
}
|
|
592
|
+
/** The interface a package's install asks, in the order a screen asks it:
|
|
593
|
+
* the consent list, the sample content when it ships, one unticked question
|
|
594
|
+
* per offered role, then the plugin's own steps (a copy). The built-ins are
|
|
595
|
+
* never declared; they follow from what ships. */
|
|
596
|
+
export declare function installInterfaceFor(manifest: InstallInterfaceManifest, shipped: ShippedInstallFacts): InstallInterface;
|
|
597
|
+
export {};
|