@blokkli/editor 2.0.0-alpha.60 → 2.0.0-alpha.62
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/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/modules/agent/index.mjs +2 -5
- package/dist/modules/agent/runtime/app/features/agent/Container.vue +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +15 -3
- package/dist/modules/agent/runtime/app/features/agent/index.vue +5 -1
- package/dist/modules/agent/runtime/app/features/agent/types.d.ts +2 -1
- package/dist/modules/agent/runtime/app/helpers/mutationResult.d.ts +38 -0
- package/dist/modules/agent/runtime/app/helpers/mutationResult.js +49 -0
- package/dist/modules/agent/runtime/app/prompts/fixReadability.js +3 -3
- package/dist/modules/agent/runtime/app/providers/agentProvider.d.ts +2 -1
- package/dist/modules/agent/runtime/app/providers/agentProvider.js +6 -6
- package/dist/modules/agent/runtime/app/providers/toolsProvider.js +3 -13
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +25 -0
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +24 -0
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +32 -0
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +6 -4
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/add_template/index.js +5 -3
- package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +3 -3
- package/dist/modules/agent/runtime/app/tools/ask_question/index.js +7 -6
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +10 -1
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +4 -4
- package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +10 -1
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +5 -3
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +31 -0
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +7 -7
- package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +7 -0
- package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +10 -0
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +35 -0
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +20 -0
- package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +30 -0
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +7 -6
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +25 -0
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +8 -0
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +6 -0
- package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +81 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +20 -12
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +14 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +38 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +7 -6
- package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.d.ts +12 -0
- package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +14 -0
- package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +9 -0
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +21 -0
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +20 -0
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +13 -5
- package/dist/modules/agent/runtime/app/tools/schemas.js +17 -10
- package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +15 -0
- package/dist/modules/agent/runtime/app/tools/search_content/index.js +8 -7
- package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +5 -1
- package/dist/modules/agent/runtime/app/tools/search_media/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +13 -0
- package/dist/modules/agent/runtime/app/tools/search_templates/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +15 -0
- package/dist/modules/agent/runtime/app/tools/search_text/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +2 -2
- package/dist/modules/agent/runtime/app/tools/select_media/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +13 -4
- package/dist/modules/agent/runtime/app/tools/update_text_fields/index.js +8 -7
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +2 -2
- package/dist/modules/agent/runtime/app/types/index.d.ts +6 -9
- package/dist/modules/agent/runtime/app/types/index.js +4 -3
- package/dist/modules/agent/runtime/server/agent.js +1 -1
- package/dist/modules/agent/runtime/server/classes/Session/index.d.ts +2 -2
- package/dist/modules/agent/runtime/server/classes/Session/index.js +6 -5
- package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +2 -1
- package/dist/modules/agent/runtime/shared/toolParams.d.ts +19 -0
- package/dist/modules/agent/runtime/shared/toolParams.js +6 -0
- package/dist/modules/agent/runtime/shared/types.d.ts +23 -4
- package/dist/modules/agent/runtime/shared/types.js +6 -1
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +4 -13
- package/dist/modules/drupal/runtime/adapter/index.js +36 -26
- package/dist/runtime/editor/components/Actions/Title/index.vue +7 -6
- package/dist/runtime/editor/components/DiffApproval/index.vue +2 -2
- package/dist/runtime/editor/components/Dropdown/index.vue +0 -39
- package/dist/runtime/editor/components/DropdownItem/index.d.vue.ts +12 -2
- package/dist/runtime/editor/components/DropdownItem/index.vue +46 -2
- package/dist/runtime/editor/components/DropdownItem/index.vue.d.ts +12 -2
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/features/changelog/changelog.json +9 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +2 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
- package/dist/runtime/editor/translations/de.json +2 -0
- package/dist/runtime/editor/translations/gsw_CH.json +9 -0
- package/package.json +3 -2
|
@@ -2,25 +2,27 @@ import { z } from "zod";
|
|
|
2
2
|
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
3
|
import { mutationResultSchema, parentSchema, positionSchema } from "../schemas.js";
|
|
4
4
|
import { resolvePosition } from "../helpers.js";
|
|
5
|
-
|
|
5
|
+
import { countNewParagraphs } from "#blokkli/agent/app/helpers/mutationResult";
|
|
6
|
+
export const paramsSchema = z.object({
|
|
6
7
|
templateUuid: z.string().describe(
|
|
7
8
|
"The UUID of the template to add (from search_templates results)"
|
|
8
9
|
),
|
|
9
10
|
parent: parentSchema.describe("The parent entity to add the template to"),
|
|
10
11
|
position: positionSchema
|
|
11
12
|
});
|
|
13
|
+
export const resultSchema = mutationResultSchema;
|
|
12
14
|
export default defineBlokkliAgentTool({
|
|
13
15
|
name: "add_template",
|
|
14
16
|
description: "Add a template to the page. Templates are copied when added, so changes to the added paragraphs won't affect other pages using the same template.",
|
|
15
17
|
category: "mutation",
|
|
16
|
-
prunedSummary: (r) => r.success ? `added template (${r.newParagraphs
|
|
18
|
+
prunedSummary: (r) => r.success ? `added template (${countNewParagraphs(r.newParagraphs ?? [])} paragraphs)` : "rejected",
|
|
17
19
|
lazy: true,
|
|
18
20
|
modes: ["editing"],
|
|
19
21
|
label($t) {
|
|
20
22
|
return $t("aiAgentAddTemplateRunning", "Adding template", { more: true });
|
|
21
23
|
},
|
|
22
24
|
paramsSchema,
|
|
23
|
-
resultSchema
|
|
25
|
+
resultSchema,
|
|
24
26
|
requiredAdapterMethods: ["templatesAdd"],
|
|
25
27
|
execute(ctx, params) {
|
|
26
28
|
const { fields, $t } = ctx.app;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
declare const paramsSchema: z.ZodObject<{
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
3
|
question: z.ZodString;
|
|
4
4
|
options: z.ZodArray<z.ZodObject<{
|
|
5
5
|
value: z.ZodString;
|
|
6
6
|
label: z.ZodString;
|
|
7
7
|
}, z.core.$strip>>;
|
|
8
|
-
multiSelect:
|
|
8
|
+
multiSelect: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
|
|
9
9
|
paragraphUuids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
|
-
declare const resultSchema: z.ZodObject<{
|
|
11
|
+
export declare const resultSchema: z.ZodObject<{
|
|
12
12
|
selected: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
13
13
|
label: z.ZodOptional<z.ZodString>;
|
|
14
14
|
}, z.core.$strip>;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
|
-
import {
|
|
3
|
+
import { booleanParamWithDefault } from "../../../shared/toolParams.js";
|
|
4
4
|
import Component from "./Component.vue";
|
|
5
5
|
const optionSchema = z.object({
|
|
6
6
|
value: z.string().describe("The option value"),
|
|
7
7
|
label: z.string().describe("The display label")
|
|
8
8
|
});
|
|
9
|
-
const paramsSchema = z.object({
|
|
9
|
+
export const paramsSchema = z.object({
|
|
10
10
|
question: z.string().describe("The question to ask the user"),
|
|
11
11
|
options: z.array(optionSchema).describe("Available options to choose from"),
|
|
12
|
-
multiSelect:
|
|
13
|
-
`Allow selecting multiple options. If false, the user has the option to enter a custom option if none of the options are good
|
|
14
|
-
|
|
12
|
+
multiSelect: booleanParamWithDefault(
|
|
13
|
+
`Allow selecting multiple options. If false, the user has the option to enter a custom option if none of the options are good.`,
|
|
14
|
+
false
|
|
15
|
+
),
|
|
15
16
|
paragraphUuids: z.array(z.string()).optional().describe(
|
|
16
17
|
"Optional UUIDs of paragraphs this question relates to. When provided, these paragraphs will be highlighted on the page."
|
|
17
18
|
)
|
|
18
19
|
});
|
|
19
|
-
const resultSchema = z.object({
|
|
20
|
+
export const resultSchema = z.object({
|
|
20
21
|
selected: z.union([z.string(), z.array(z.string())]).nullable().describe("Selected value(s), or null if cancelled"),
|
|
21
22
|
label: z.string().optional().describe("Human-readable label of what was selected (for UI display)")
|
|
22
23
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { fieldDiffResultSchema } from '../schemas.js';
|
|
3
3
|
import { type SkippedField } from '../fieldDiffApproval.js';
|
|
4
|
-
declare const paramsSchema: z.ZodObject<{
|
|
4
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
5
5
|
uuids: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
7
|
export type AutoTranslateParams = z.infer<typeof paramsSchema>;
|
|
@@ -15,5 +15,14 @@ export type ComponentParams = {
|
|
|
15
15
|
uuids: string[];
|
|
16
16
|
skipped: SkippedField[];
|
|
17
17
|
};
|
|
18
|
+
export declare const resultSchema: z.ZodObject<{
|
|
19
|
+
acceptedCount: z.ZodNumber;
|
|
20
|
+
rejectedByUser: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
21
|
+
reasonForRejection: z.ZodString;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
23
|
+
label: z.ZodString;
|
|
24
|
+
agentMessage: z.ZodOptional<z.ZodString>;
|
|
25
|
+
historyIndex: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
}, z.core.$strip>;
|
|
18
27
|
declare const _default: any;
|
|
19
28
|
export default _default;
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
requireNoRestrictedAncestor
|
|
6
6
|
} from "../../helpers/validation.js";
|
|
7
7
|
import { onlyUnique } from "#blokkli/helpers";
|
|
8
|
-
import { fieldDiffResultSchema } from "../schemas.js";
|
|
9
|
-
import { stringArrayParam } from "../schemas.js";
|
|
8
|
+
import { fieldDiffResultSchema, stringArrayParam } from "../schemas.js";
|
|
10
9
|
import { resolveHost } from "../helpers.js";
|
|
11
10
|
import { skippedFieldsMessage } from "../fieldDiffApproval.js";
|
|
12
11
|
import Component from "./Component.vue";
|
|
13
12
|
import DetailsComponent from "../../components/FieldDiffDetails/index.vue";
|
|
14
|
-
const paramsSchema = z.object({
|
|
13
|
+
export const paramsSchema = z.object({
|
|
15
14
|
uuids: stringArrayParam(
|
|
16
15
|
"UUIDs of paragraphs to auto-translate. Every editable text field on each paragraph is sent to the backend's translation service. The user reviews and accepts/rejects each translation before it is applied. The source language is always the host entity's source language; the target language is the currently-edited language."
|
|
17
16
|
)
|
|
18
17
|
});
|
|
18
|
+
export const resultSchema = fieldDiffResultSchema;
|
|
19
19
|
export default defineBlokkliAgentTool({
|
|
20
20
|
name: "auto_translate_paragraphs",
|
|
21
21
|
description: "Translate every editable text field of one or more paragraphs into the currently-edited language using the backend's configured translation service (e.g. DeepL via Drupal) \u2014 not the agent's own LLM. The user reviews each translation in a diff approval UI before it is applied. Only available in translating mode and only when the adapter exposes a translation service. Prefer this when the user asks for an automatic translation; use `delegate_text_rewrite` with `template: 'translate'` only when the user specifically wants the agent to do the translation, or when no backend translation service is configured.",
|
|
@@ -29,7 +29,7 @@ export default defineBlokkliAgentTool({
|
|
|
29
29
|
});
|
|
30
30
|
},
|
|
31
31
|
paramsSchema,
|
|
32
|
-
resultSchema
|
|
32
|
+
resultSchema,
|
|
33
33
|
requiredAdapterMethods: [
|
|
34
34
|
"loadTextFieldValuesForLanguage",
|
|
35
35
|
"requestTranslation",
|
|
@@ -1,2 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
texts: z.ZodArray<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const resultSchema: z.ZodObject<{
|
|
6
|
+
results: z.ZodArray<z.ZodObject<{
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
level: z.ZodEnum<{
|
|
9
|
+
unknown: "unknown";
|
|
10
|
+
ok: "ok";
|
|
11
|
+
good: "good";
|
|
12
|
+
hard: "hard";
|
|
13
|
+
}>;
|
|
14
|
+
score: z.ZodNullable<z.ZodNumber>;
|
|
15
|
+
note: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
1
18
|
declare const _default: any;
|
|
2
19
|
export default _default;
|
|
@@ -7,12 +7,12 @@ const textResultSchema = z.object({
|
|
|
7
7
|
score: z.number().nullable(),
|
|
8
8
|
note: z.string().optional()
|
|
9
9
|
});
|
|
10
|
-
const paramsSchema = z.object({
|
|
10
|
+
export const paramsSchema = z.object({
|
|
11
11
|
texts: z.array(z.string()).describe(
|
|
12
12
|
"Text strings to check for readability. Each string is analyzed independently."
|
|
13
13
|
)
|
|
14
14
|
});
|
|
15
|
-
const resultSchema = z.object({
|
|
15
|
+
export const resultSchema = z.object({
|
|
16
16
|
results: z.array(textResultSchema)
|
|
17
17
|
});
|
|
18
18
|
export default defineBlokkliAgentTool({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { fieldDiffResultSchema } from '../schemas.js';
|
|
3
3
|
import { type SkippedField } from '../fieldDiffApproval.js';
|
|
4
|
-
declare const paramsSchema: z.ZodObject<{
|
|
4
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
5
5
|
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
6
|
template: z.ZodLiteral<"fix_readability">;
|
|
7
7
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -37,5 +37,14 @@ export type ComponentParams = {
|
|
|
37
37
|
/** Field references dropped because the paragraph/field doesn't exist. */
|
|
38
38
|
skipped: SkippedField[];
|
|
39
39
|
};
|
|
40
|
+
export declare const resultSchema: z.ZodObject<{
|
|
41
|
+
acceptedCount: z.ZodNumber;
|
|
42
|
+
rejectedByUser: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
43
|
+
reasonForRejection: z.ZodString;
|
|
44
|
+
}, z.core.$strip>>>;
|
|
45
|
+
label: z.ZodString;
|
|
46
|
+
agentMessage: z.ZodOptional<z.ZodString>;
|
|
47
|
+
historyIndex: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
}, z.core.$strip>;
|
|
40
49
|
declare const _default: any;
|
|
41
50
|
export default _default;
|
|
@@ -39,10 +39,11 @@ const requestSchema = z.discriminatedUnion("template", [
|
|
|
39
39
|
]).describe(
|
|
40
40
|
"The transform to perform. Pick a template and provide its parameters:\n- fix_readability: fix flagged readability issues (no extra params \u2014 issues are resolved automatically).\n- translate: translate all fields into `targetLanguage`.\n- rewrite: general-purpose rewrite using `instruction`.\n- generate_content: write new content using `instruction` (optional `context`)."
|
|
41
41
|
);
|
|
42
|
-
const paramsSchema = z.object({
|
|
42
|
+
export const paramsSchema = z.object({
|
|
43
43
|
request: requestSchema,
|
|
44
44
|
fields: z.array(fieldSchema).describe("The fields to transform (UUIDs and field names only)")
|
|
45
45
|
});
|
|
46
|
+
export const resultSchema = fieldDiffResultSchema;
|
|
46
47
|
export default defineBlokkliAgentTool({
|
|
47
48
|
name: "delegate_text_rewrite",
|
|
48
49
|
description: "Rewrite, translate, fix readability, or generate text fields with live streaming preview. Set `request` to the chosen template and its parameters (see the request field). The content will be streamed live into the page for immediate visual feedback.",
|
|
@@ -56,7 +57,7 @@ export default defineBlokkliAgentTool({
|
|
|
56
57
|
});
|
|
57
58
|
},
|
|
58
59
|
paramsSchema,
|
|
59
|
-
resultSchema
|
|
60
|
+
resultSchema,
|
|
60
61
|
requiredAdapterMethods: ["updateFieldValueBatched"],
|
|
61
62
|
component: Component,
|
|
62
63
|
detailsComponent: DetailsComponent,
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
uuids: z.ZodArray<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
6
|
+
type: z.ZodEnum<{
|
|
7
|
+
rewrite: "rewrite";
|
|
8
|
+
delete: "delete";
|
|
9
|
+
add: "add";
|
|
10
|
+
move: "move";
|
|
11
|
+
options: "options";
|
|
12
|
+
}>;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
error: z.ZodString;
|
|
16
|
+
}, z.core.$strip>]>;
|
|
1
17
|
declare const _default: any;
|
|
2
18
|
export default _default;
|
|
@@ -5,9 +5,10 @@ import {
|
|
|
5
5
|
requireBundlePermission,
|
|
6
6
|
requireNoRestrictedAncestor
|
|
7
7
|
} from "../../helpers/validation.js";
|
|
8
|
-
const paramsSchema = z.object({
|
|
8
|
+
export const paramsSchema = z.object({
|
|
9
9
|
uuids: z.array(z.string()).describe("The UUIDs of the paragraphs to delete")
|
|
10
10
|
});
|
|
11
|
+
export const resultSchema = mutationResultSchema;
|
|
11
12
|
export default defineBlokkliAgentTool({
|
|
12
13
|
name: "delete_paragraphs",
|
|
13
14
|
description: "Delete one or more paragraphs from the page.",
|
|
@@ -19,7 +20,7 @@ export default defineBlokkliAgentTool({
|
|
|
19
20
|
return $t("aiAgentDeleteBlocksRunning", "Deleting blocks", { more: true });
|
|
20
21
|
},
|
|
21
22
|
paramsSchema,
|
|
22
|
-
resultSchema
|
|
23
|
+
resultSchema,
|
|
23
24
|
requiredAdapterMethods: ["deleteBlocks"],
|
|
24
25
|
execute(ctx, params) {
|
|
25
26
|
const { blocks, types } = ctx.app;
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
uuids: z.ZodArray<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
6
|
+
type: z.ZodEnum<{
|
|
7
|
+
rewrite: "rewrite";
|
|
8
|
+
delete: "delete";
|
|
9
|
+
add: "add";
|
|
10
|
+
move: "move";
|
|
11
|
+
options: "options";
|
|
12
|
+
}>;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
error: z.ZodString;
|
|
16
|
+
}, z.core.$strip>]>;
|
|
1
17
|
declare const _default: any;
|
|
2
18
|
export default _default;
|
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
requireNoRestrictedAncestor
|
|
7
7
|
} from "../../helpers/validation.js";
|
|
8
8
|
import { fromLibraryBlockBundle } from "#blokkli-build/config";
|
|
9
|
-
const paramsSchema = z.object({
|
|
9
|
+
export const paramsSchema = z.object({
|
|
10
10
|
uuids: z.array(z.string()).describe("UUIDs of library paragraphs to detach")
|
|
11
11
|
});
|
|
12
|
+
export const resultSchema = mutationResultSchema;
|
|
12
13
|
export default defineBlokkliAgentTool({
|
|
13
14
|
name: "detach_reusable_paragraph",
|
|
14
15
|
description: "Detach one or more library paragraphs to create editable copies. IMPORTANT: The original library paragraph UUIDs will no longer exist after detaching. The result includes newParagraphs containing the UUIDs and bundles of the newly created editable paragraph. Use these new UUIDs for any subsequent operations.",
|
|
@@ -22,7 +23,7 @@ export default defineBlokkliAgentTool({
|
|
|
22
23
|
});
|
|
23
24
|
},
|
|
24
25
|
paramsSchema,
|
|
25
|
-
resultSchema
|
|
26
|
+
resultSchema,
|
|
26
27
|
requiredAdapterMethods: ["detachReusableBlock"],
|
|
27
28
|
execute(ctx, params) {
|
|
28
29
|
const { blocks, $t } = ctx.app;
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
uuids: z.ZodArray<z.ZodString>;
|
|
4
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
type: z.ZodString;
|
|
6
|
+
uuid: z.ZodString;
|
|
7
|
+
field: z.ZodString;
|
|
8
|
+
}, z.core.$strip>>;
|
|
9
|
+
position: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
12
|
+
type: z.ZodEnum<{
|
|
13
|
+
rewrite: "rewrite";
|
|
14
|
+
delete: "delete";
|
|
15
|
+
add: "add";
|
|
16
|
+
move: "move";
|
|
17
|
+
options: "options";
|
|
18
|
+
}>;
|
|
19
|
+
label: z.ZodString;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
error: z.ZodString;
|
|
22
|
+
}, z.core.$strip>]>;
|
|
1
23
|
declare const _default: any;
|
|
2
24
|
export default _default;
|
|
@@ -11,18 +11,20 @@ import {
|
|
|
11
11
|
requireNoRestrictedAncestor
|
|
12
12
|
} from "../../helpers/validation.js";
|
|
13
13
|
import { getFieldKey } from "#blokkli/helpers";
|
|
14
|
-
|
|
14
|
+
import { countNewParagraphs } from "#blokkli/agent/app/helpers/mutationResult";
|
|
15
|
+
export const paramsSchema = z.object({
|
|
15
16
|
uuids: z.array(z.string()).min(1).describe("Paragraph UUIDs to duplicate"),
|
|
16
17
|
parent: parentSchema.optional().describe("Target parent field. If omitted, duplicates in same field."),
|
|
17
18
|
position: positionSchema.describe(
|
|
18
19
|
'Where to place the duplicated paragraphs (only when parent is provided). Defaults to "end".'
|
|
19
20
|
)
|
|
20
21
|
});
|
|
22
|
+
export const resultSchema = mutationResultSchema;
|
|
21
23
|
export default defineBlokkliAgentTool({
|
|
22
24
|
name: "duplicate_paragraphs",
|
|
23
25
|
description: "Duplicate one or more paragraphs, with ALL their child paragraphs. Without parent parameter, duplicates in the same field. With parent parameter, duplicates to a different field.",
|
|
24
26
|
category: "mutation",
|
|
25
|
-
prunedSummary: (r) => r.success ? `duplicated ${r.newParagraphs
|
|
27
|
+
prunedSummary: (r) => r.success ? `duplicated ${countNewParagraphs(r.newParagraphs ?? [])} paragraphs` : "rejected",
|
|
26
28
|
modes: ["editing"],
|
|
27
29
|
lazy: true,
|
|
28
30
|
label($t) {
|
|
@@ -31,7 +33,7 @@ export default defineBlokkliAgentTool({
|
|
|
31
33
|
});
|
|
32
34
|
},
|
|
33
35
|
paramsSchema,
|
|
34
|
-
resultSchema
|
|
36
|
+
resultSchema,
|
|
35
37
|
requiredAdapterMethods: ["duplicateBlocks"],
|
|
36
38
|
execute(ctx, params) {
|
|
37
39
|
const { $t, types } = ctx.app;
|
|
@@ -1,2 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
bundle: z.ZodOptional<z.ZodString>;
|
|
4
|
+
bundles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
|
+
hasChildren: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
6
|
+
isRootLevel: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
7
|
+
nestingLevel: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
parentBundle: z.ZodOptional<z.ZodString>;
|
|
9
|
+
inField: z.ZodOptional<z.ZodString>;
|
|
10
|
+
containsText: z.ZodOptional<z.ZodString>;
|
|
11
|
+
optionEquals: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
key: z.ZodString;
|
|
13
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const resultSchema: z.ZodObject<{
|
|
18
|
+
paragraphs: z.ZodArray<z.ZodObject<{
|
|
19
|
+
uuid: z.ZodString;
|
|
20
|
+
bundle: z.ZodString;
|
|
21
|
+
label: z.ZodString;
|
|
22
|
+
nestingLevel: z.ZodNumber;
|
|
23
|
+
parent: z.ZodObject<{
|
|
24
|
+
type: z.ZodString;
|
|
25
|
+
uuid: z.ZodString;
|
|
26
|
+
field: z.ZodString;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
total: z.ZodNumber;
|
|
30
|
+
hasMore: z.ZodBoolean;
|
|
31
|
+
}, z.core.$strip>;
|
|
1
32
|
declare const _default: any;
|
|
2
33
|
export default _default;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
3
|
import { parentSchema } from "../schemas.js";
|
|
4
|
-
import {
|
|
4
|
+
import { optionalBooleanParam } from "../../../shared/toolParams.js";
|
|
5
5
|
import { getResolvedOptions } from "../helpers.js";
|
|
6
6
|
import {
|
|
7
7
|
getMutatedOptionValue,
|
|
8
8
|
optionValueToStorable
|
|
9
9
|
} from "#blokkli/editor/helpers/options";
|
|
10
|
-
const paramsSchema = z.object({
|
|
10
|
+
export const paramsSchema = z.object({
|
|
11
11
|
// Bundle filters
|
|
12
12
|
bundle: z.string().optional().describe("Filter by exact bundle name"),
|
|
13
13
|
bundles: z.array(z.string()).optional().describe("Filter by any of these bundles"),
|
|
14
14
|
// Structure filters
|
|
15
|
-
hasChildren:
|
|
15
|
+
hasChildren: optionalBooleanParam(
|
|
16
16
|
"Filter by whether paragraph has child paragraphs"
|
|
17
|
-
)
|
|
18
|
-
isRootLevel:
|
|
17
|
+
),
|
|
18
|
+
isRootLevel: optionalBooleanParam(
|
|
19
19
|
"Filter to root level paragraphs (nesting 0)"
|
|
20
|
-
)
|
|
20
|
+
),
|
|
21
21
|
nestingLevel: z.number().optional().describe("Filter to exact nesting level"),
|
|
22
22
|
parentBundle: z.string().optional().describe("Filter to paragraphs whose parent is this bundle"),
|
|
23
23
|
inField: z.string().optional().describe("Filter to paragraphs in a field with this name"),
|
|
@@ -38,7 +38,7 @@ const paragraphResultSchema = z.object({
|
|
|
38
38
|
nestingLevel: z.number().describe("Nesting depth (0 = root level)"),
|
|
39
39
|
parent: parentSchema.describe("The parent entity containing this paragraph")
|
|
40
40
|
});
|
|
41
|
-
const resultSchema = z.object({
|
|
41
|
+
export const resultSchema = z.object({
|
|
42
42
|
paragraphs: z.array(paragraphResultSchema).describe("paragraphs matching the filters"),
|
|
43
43
|
total: z.number().describe("Total number of matches before pagination"),
|
|
44
44
|
hasMore: z.boolean().describe("Whether there are more results beyond the limit")
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
3
|
+
export declare const resultSchema: z.ZodArray<z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
label: z.ZodString;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>>;
|
|
1
8
|
declare const _default: any;
|
|
2
9
|
export default _default;
|
|
@@ -5,8 +5,8 @@ const fragmentSchema = z.object({
|
|
|
5
5
|
label: z.string().describe("The display label"),
|
|
6
6
|
description: z.string().optional().describe("A short description of the fragment")
|
|
7
7
|
});
|
|
8
|
-
const paramsSchema = z.object({});
|
|
9
|
-
const resultSchema = z.array(fragmentSchema).describe("All available fragments");
|
|
8
|
+
export const paramsSchema = z.object({});
|
|
9
|
+
export const resultSchema = z.array(fragmentSchema).describe("All available fragments");
|
|
10
10
|
export default defineBlokkliAgentTool({
|
|
11
11
|
name: "get_all_fragments",
|
|
12
12
|
description: "Get all available fragments that can be added to the page",
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
3
|
+
export declare const resultSchema: z.ZodObject<{
|
|
4
|
+
content: z.ZodArray<z.ZodObject<{
|
|
5
|
+
uuid: z.ZodString;
|
|
6
|
+
bundle: z.ZodString;
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
referenceFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
1
11
|
declare const _default: any;
|
|
2
12
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
3
|
import { readBlockContentFields } from "../helpers.js";
|
|
4
|
-
const paramsSchema = z.object({});
|
|
4
|
+
export const paramsSchema = z.object({});
|
|
5
5
|
const blockContentSchema = z.object({
|
|
6
6
|
uuid: z.string().describe("The paragraph UUID"),
|
|
7
7
|
bundle: z.string().describe("The paragraph type"),
|
|
@@ -10,7 +10,7 @@ const blockContentSchema = z.object({
|
|
|
10
10
|
"Names of reference/link content fields on this paragraph (e.g., media fields)"
|
|
11
11
|
)
|
|
12
12
|
});
|
|
13
|
-
const resultSchema = z.object({
|
|
13
|
+
export const resultSchema = z.object({
|
|
14
14
|
content: z.array(blockContentSchema).describe("All paragraphs with their text content, flattened")
|
|
15
15
|
});
|
|
16
16
|
export default defineBlokkliAgentTool({
|
|
@@ -1,2 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
parentUuid: z.ZodString;
|
|
4
|
+
parentField: z.ZodString;
|
|
5
|
+
bundles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const resultSchema: z.ZodObject<{
|
|
8
|
+
fieldLabel: z.ZodString;
|
|
9
|
+
cardinality: z.ZodNumber;
|
|
10
|
+
currentCount: z.ZodNumber;
|
|
11
|
+
bundles: z.ZodArray<z.ZodObject<{
|
|
12
|
+
bundle: z.ZodString;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
description: z.ZodOptional<z.ZodString>;
|
|
15
|
+
contentFields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
16
|
+
type: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
paragraphFields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
19
|
+
label: z.ZodString;
|
|
20
|
+
allowedBundles: z.ZodArray<z.ZodString>;
|
|
21
|
+
cardinality: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
24
|
+
type: z.ZodString;
|
|
25
|
+
label: z.ZodString;
|
|
26
|
+
description: z.ZodOptional<z.ZodString>;
|
|
27
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
28
|
+
min: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
29
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
30
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
currentValue: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
nestingInfo: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>;
|
|
1
36
|
declare const _default: any;
|
|
2
37
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
|
3
3
|
import { getRuntimeOptionValue } from "#blokkli/runtime-helpers";
|
|
4
4
|
import { blockOptionsMapSchema } from "../schemas.js";
|
|
5
5
|
import { extractOptionLabels, getResolvedOptions } from "../helpers.js";
|
|
6
|
-
const paramsSchema = z.object({
|
|
6
|
+
export const paramsSchema = z.object({
|
|
7
7
|
parentUuid: z.string().describe("The parent entity UUID"),
|
|
8
8
|
parentField: z.string().describe("The field name on the parent"),
|
|
9
9
|
bundles: z.array(z.string()).optional().describe(
|
|
@@ -36,7 +36,7 @@ const bundleSchema = z.object({
|
|
|
36
36
|
"Available options for this bundle with their default values (only included when few bundles are returned)"
|
|
37
37
|
)
|
|
38
38
|
});
|
|
39
|
-
const resultSchema = z.object({
|
|
39
|
+
export const resultSchema = z.object({
|
|
40
40
|
fieldLabel: z.string().describe("Human-readable field label"),
|
|
41
41
|
cardinality: z.number().describe("Max paragraphs allowed (-1 = unlimited)"),
|
|
42
42
|
currentCount: z.number().describe("Current number of paragraphs in the field"),
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodObject<{
|
|
3
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const resultSchema: z.ZodObject<{
|
|
6
|
+
parentBundle: z.ZodString;
|
|
7
|
+
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
8
|
+
label: z.ZodString;
|
|
9
|
+
cardinality: z.ZodNumber;
|
|
10
|
+
parent: z.ZodObject<{
|
|
11
|
+
type: z.ZodString;
|
|
12
|
+
uuid: z.ZodString;
|
|
13
|
+
field: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
paragraphs: z.ZodArray<z.ZodObject<{
|
|
16
|
+
uuid: z.ZodString;
|
|
17
|
+
bundle: z.ZodString;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
1
21
|
declare const _default: any;
|
|
2
22
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
3
|
import { parentSchema } from "../schemas.js";
|
|
4
|
-
const paramsSchema = z.object({
|
|
4
|
+
export const paramsSchema = z.object({
|
|
5
5
|
uuid: z.string().optional().describe(
|
|
6
6
|
"Paragraph UUID to get children for. If not provided, returns page-level paragraphs."
|
|
7
7
|
)
|
|
@@ -18,7 +18,7 @@ const fieldWithParagraphsSchema = z.object({
|
|
|
18
18
|
),
|
|
19
19
|
paragraphs: z.array(paragraphSchema).describe("Paragraphs in this field")
|
|
20
20
|
});
|
|
21
|
-
const resultSchema = z.object({
|
|
21
|
+
export const resultSchema = z.object({
|
|
22
22
|
parentBundle: z.string().describe("The bundle type of the parent (page or paragraph)"),
|
|
23
23
|
fields: z.record(z.string().describe("Field name"), fieldWithParagraphsSchema).describe("Fields keyed by name, each with parent object and paragraphs")
|
|
24
24
|
});
|
|
@@ -1,2 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paramsSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
3
|
+
uuids: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>;
|
|
4
|
+
includeNested: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
|
|
5
|
+
}, z.core.$strip>>;
|
|
6
|
+
export declare const resultSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
+
type: z.ZodLiteral<"plain">;
|
|
8
|
+
currentValue: z.ZodString;
|
|
9
|
+
required: z.ZodBoolean;
|
|
10
|
+
maxLength: z.ZodNumber;
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<"markup">;
|
|
13
|
+
currentValue: z.ZodString;
|
|
14
|
+
required: z.ZodBoolean;
|
|
15
|
+
maxLength: z.ZodNumber;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"reference">;
|
|
18
|
+
label: z.ZodString;
|
|
19
|
+
allowed: z.ZodArray<z.ZodObject<{
|
|
20
|
+
type: z.ZodString;
|
|
21
|
+
bundles: z.ZodArray<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"link">;
|
|
25
|
+
label: z.ZodString;
|
|
26
|
+
allowed: z.ZodArray<z.ZodObject<{
|
|
27
|
+
type: z.ZodString;
|
|
28
|
+
bundles: z.ZodArray<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$strip>], "type">>>;
|
|
1
31
|
declare const _default: any;
|
|
2
32
|
export default _default;
|