@purpleschool/gptbot-tools 0.1.9 → 0.1.11-stage-2
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/build/common/models/index.js +1 -0
- package/build/common/models/locale.schema.js +9 -0
- package/build/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.js +1 -0
- package/build/image-editor/models/image-editor-model.schema.js +2 -0
- package/build/image-editor/queries/get-image-editor-config.query.js +3 -2
- package/build/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.js +1 -0
- package/build/image-generation/models/image-generation-model.schema.js +1 -0
- package/build/image-generation/queries/get-image-generation-config.query.js +3 -4
- package/build/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.js +1 -0
- package/build/interior-design/queries/get-interior-design-config.query.js +3 -2
- package/build/marketplace-card/queries/get-marketplace-card-config.query.js +1 -2
- package/build/music/commands/music-model/get-music-model-by-uuid.command.js +1 -0
- package/build/music/queries/get-music-config.query.js +3 -2
- package/build/paraphrase/queries/get-paraphrase-tool-config.query.js +3 -2
- package/build/presentation/models/slide-content.schema.js +181 -49
- package/build/presentation/queries/get-presentation-config.query.js +1 -0
- package/build/solving-edu-task/queries/get-solving-edu-task-config.query.js +1 -2
- package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.js +3 -2
- package/build/stt/queries/get-stt-config.query.js +3 -2
- package/build/tools/queries/find-all-tools.query.js +1 -0
- package/build/tools/queries/get-global-tools-config.query.js +3 -2
- package/build/tools/queries/get-tools-with-configs.query.js +3 -2
- package/build/video/commands/video-model/get-video-model-by-uuid.command.js +1 -0
- package/build/video/queries/get-video-config.query.js +3 -2
- package/build/video-editor/commands/video-editor-model/get-video-editor-model.command.js +1 -0
- package/build/video-editor/queries/get-video-editor-config.query.js +3 -4
- package/build/writer/queries/get-writer-config.query.js +1 -0
- package/common/models/index.ts +1 -0
- package/common/models/locale.schema.ts +11 -0
- package/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.ts +2 -1
- package/image-editor/models/image-editor-model.schema.ts +2 -0
- package/image-editor/queries/get-image-editor-config.query.ts +4 -1
- package/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.ts +2 -1
- package/image-generation/models/image-generation-model.schema.ts +1 -0
- package/image-generation/queries/get-image-generation-config.query.ts +2 -2
- package/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.ts +2 -1
- package/interior-design/queries/get-interior-design-config.query.ts +4 -1
- package/marketplace-card/queries/get-marketplace-card-config.query.ts +2 -2
- package/music/commands/music-model/get-music-model-by-uuid.command.ts +2 -1
- package/music/queries/get-music-config.query.ts +4 -1
- package/package.json +2 -1
- package/paraphrase/queries/get-paraphrase-tool-config.query.ts +4 -1
- package/presentation/models/slide-content.schema.ts +244 -50
- package/presentation/queries/get-presentation-config.query.ts +4 -1
- package/solving-edu-task/queries/get-solving-edu-task-config.query.ts +2 -2
- package/spell-corrector/queries/get-spell-corrector-tool-config.query.ts +4 -1
- package/stt/queries/get-stt-config.query.ts +4 -1
- package/tools/queries/find-all-tools.query.ts +4 -1
- package/tools/queries/get-global-tools-config.query.ts +4 -1
- package/tools/queries/get-tools-with-configs.query.ts +4 -1
- package/video/commands/video-model/get-video-model-by-uuid.command.ts +2 -1
- package/video/queries/get-video-config.query.ts +4 -1
- package/video-editor/commands/video-editor-model/get-video-editor-model.command.ts +2 -1
- package/video-editor/queries/get-video-editor-config.query.ts +2 -2
- package/writer/queries/get-writer-config.query.ts +4 -1
|
@@ -5,5 +5,6 @@ const common_1 = require("../../common");
|
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
var GetWriterConfigQuery;
|
|
7
7
|
(function (GetWriterConfigQuery) {
|
|
8
|
+
GetWriterConfigQuery.RequestSchema = common_1.LocaleRequestSchema;
|
|
8
9
|
GetWriterConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterConfigSchema);
|
|
9
10
|
})(GetWriterConfigQuery || (exports.GetWriterConfigQuery = GetWriterConfigQuery = {}));
|
package/common/models/index.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export const LocaleSchema = z.nativeEnum(LOCALE);
|
|
5
|
+
|
|
6
|
+
export const LocaleRequestSchema = z.object({
|
|
7
|
+
locale: LocaleSchema,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type Locale = z.infer<typeof LocaleSchema>;
|
|
11
|
+
export type LocaleRequest = z.infer<typeof LocaleRequestSchema>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ImageEditorModelSchema } from '../../models';
|
|
3
|
-
import { ICommandResponseSchema } from '../../../common';
|
|
3
|
+
import { ICommandResponseSchema, LocaleSchema } from '../../../common';
|
|
4
4
|
|
|
5
5
|
export namespace GetImageEditorModelByUuidCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
locale: LocaleSchema,
|
|
8
9
|
});
|
|
9
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
11
|
|
|
@@ -39,6 +39,8 @@ export const ImageEditorModelSchema = z.object({
|
|
|
39
39
|
title: z.string(),
|
|
40
40
|
description: z.string(),
|
|
41
41
|
aiModel: z.string(),
|
|
42
|
+
isNew: z.boolean(),
|
|
43
|
+
tierLabel: z.string(),
|
|
42
44
|
pricePerImage: z.number(),
|
|
43
45
|
order: z.number(),
|
|
44
46
|
status: z.nativeEnum(TOOL_MODEL_STATUS),
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { ImageEditorConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetImageEditorConfigQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(ImageEditorConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ImageGenerationModelSchema } from '../../models';
|
|
3
|
-
import { ICommandResponseSchema } from '../../../common';
|
|
3
|
+
import { ICommandResponseSchema, LocaleSchema } from '../../../common';
|
|
4
4
|
|
|
5
5
|
export namespace GetImageGenerationModelByUuidCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
locale: LocaleSchema,
|
|
8
9
|
});
|
|
9
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { ImageGenerationConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetImageGenerationConfigQuery {
|
|
6
|
-
export const RequestSchema =
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
7
|
export type Request = z.infer<typeof RequestSchema>;
|
|
8
8
|
|
|
9
9
|
export const ResponseSchema = ICommandResponseSchema(ImageGenerationConfigSchema);
|
package/interior-design/commands/interior-design-model/get-interior-design-model-by-uuid.command.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../../common';
|
|
2
|
+
import { ICommandResponseSchema, LocaleSchema } from '../../../common';
|
|
3
3
|
import { InteriorDesignModelSchema } from '../../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetInteriorDesignModelByUuidCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
locale: LocaleSchema,
|
|
8
9
|
});
|
|
9
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
11
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { InteriorDesignConfigSchema } from '../models/interior-design-config.schema';
|
|
4
4
|
|
|
5
5
|
export namespace GetInteriorDesignConfigQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(InteriorDesignConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common';
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { MarketplaceCardConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetMarketplaceCardConfigQuery {
|
|
6
|
-
export const RequestSchema =
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
7
|
export type Request = z.infer<typeof RequestSchema>;
|
|
8
8
|
export const ResponseSchema = ICommandResponseSchema(MarketplaceCardConfigSchema);
|
|
9
9
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MusicModelSchema } from '../../models';
|
|
3
|
-
import { ICommandResponseSchema } from '../../../common';
|
|
3
|
+
import { ICommandResponseSchema, LocaleSchema } from '../../../common';
|
|
4
4
|
|
|
5
5
|
export namespace GetMusicModelByUuidCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
locale: LocaleSchema,
|
|
8
9
|
});
|
|
9
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
11
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { MusicConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetMusicConfigQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(MusicConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpleschool/gptbot-tools",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11-stage-2",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"description": "",
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@purpleschool/rugpt-lib-common": "^0.0.18",
|
|
15
16
|
"zod": "^3.25.67"
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { ParaphraseToolConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetParaphraseToolConfigQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(ParaphraseToolConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -10,7 +10,19 @@ export const ImageSlotSchema = z.object({
|
|
|
10
10
|
.string()
|
|
11
11
|
.uuid()
|
|
12
12
|
.describe('Generate a valid uuid for image slot, that will be used for future lookups'),
|
|
13
|
-
prompt: z
|
|
13
|
+
prompt: z
|
|
14
|
+
.string()
|
|
15
|
+
.describe(
|
|
16
|
+
'Image generation prompt. MUST be written in ENGLISH regardless of the presentation language. ' +
|
|
17
|
+
'AI image generators excel at: atmospheric scenes, landscapes, cityscapes, architecture, nature, abstract light and texture, anonymous silhouettes, artistic photography. ' +
|
|
18
|
+
'AI fundamentally cannot render accurately: legible text on any surface, complex diagrams or flowcharts, data charts/graphs, specific product logos, clocks, precise mechanical parts. ' +
|
|
19
|
+
'Choose scene types from the first category. Avoid anything in the second. ' +
|
|
20
|
+
'Structure: [subject/scene] → [mood/atmosphere] → [lighting] → [visual style]. ' +
|
|
21
|
+
'Evoke the emotional register of the slide — do not illustrate the topic literally. ' +
|
|
22
|
+
'MODERATION: if the slide topic involves conflict, suffering, politics, or crime, redirect to abstract/atmospheric imagery (fog, ruins, empty landscapes) rather than depicting the subject directly — flagged prompts produce empty placeholders. ' +
|
|
23
|
+
'GOOD: "A lone figure on an observation deck at dusk gazing over an illuminated city. Cinematic wide-angle, golden-hour light, photorealistic." ' +
|
|
24
|
+
'BAD: "A bar chart showing quarterly growth. A robot at a laptop with code on the screen."',
|
|
25
|
+
),
|
|
14
26
|
});
|
|
15
27
|
export type ImageSlot = z.infer<typeof ImageSlotSchema>;
|
|
16
28
|
|
|
@@ -176,19 +188,37 @@ export type ThankYouSlideData = z.infer<typeof ThankYouSlideDataSchema>;
|
|
|
176
188
|
|
|
177
189
|
export const StructuredListSlideDataSchema = z.object({
|
|
178
190
|
contentType: z.literal(SLIDE_CONTENT_TYPE.STRUCTURED_LIST),
|
|
179
|
-
title: z
|
|
180
|
-
|
|
191
|
+
title: z
|
|
192
|
+
.string()
|
|
193
|
+
.describe(
|
|
194
|
+
'Slide headline — 2–4 words naming the group. A noun phrase, NOT a full sentence. Displayed in very large font on the left panel.',
|
|
195
|
+
)
|
|
196
|
+
.min(5)
|
|
197
|
+
.max(40),
|
|
198
|
+
description: z
|
|
199
|
+
.string()
|
|
200
|
+
.describe(
|
|
201
|
+
'One framing sentence answering "What are these 4 things about?". Displayed in small text below the title on the left panel.',
|
|
202
|
+
)
|
|
203
|
+
.min(30)
|
|
204
|
+
.max(80),
|
|
181
205
|
list: z
|
|
182
206
|
.array(
|
|
183
207
|
z.object({
|
|
184
|
-
title: z
|
|
208
|
+
title: z
|
|
209
|
+
.string()
|
|
210
|
+
.describe(
|
|
211
|
+
'2–4 concrete words. A noun phrase or short verb phrase. All 4 titles MUST be grammatically parallel. Displayed in bold next to a large number (01–04).',
|
|
212
|
+
)
|
|
213
|
+
.min(3)
|
|
214
|
+
.max(30),
|
|
185
215
|
description: z
|
|
186
216
|
.string()
|
|
187
217
|
.describe(
|
|
188
|
-
|
|
218
|
+
'ONE complete sentence that expands on the title with a specific fact or benefit. NEVER just restate the title. NEVER cut short mid-word or mid-sentence. All 4 descriptions must be roughly equal in length.',
|
|
189
219
|
)
|
|
190
220
|
.min(50)
|
|
191
|
-
.max(
|
|
221
|
+
.max(100),
|
|
192
222
|
}),
|
|
193
223
|
)
|
|
194
224
|
.length(4),
|
|
@@ -198,14 +228,25 @@ export type StructuredListSlideData = z.infer<typeof StructuredListSlideDataSche
|
|
|
198
228
|
|
|
199
229
|
export const TextSlideDataSchema = z.object({
|
|
200
230
|
contentType: z.literal(SLIDE_CONTENT_TYPE.TEXT),
|
|
201
|
-
title: z
|
|
231
|
+
title: z
|
|
232
|
+
.string()
|
|
233
|
+
.describe(
|
|
234
|
+
'Slide headline rendered in very large bold font. Keep to 3–7 words (max 70 characters). It should name the topic or thesis — not summarise all content.',
|
|
235
|
+
)
|
|
236
|
+
.min(10)
|
|
237
|
+
.max(70),
|
|
202
238
|
description: z
|
|
203
239
|
.string()
|
|
204
240
|
.describe(
|
|
205
|
-
|
|
241
|
+
'Expository prose split into 2–3 paragraphs separated by \\n\\n (double newline). Total length 300–800 characters. ' +
|
|
242
|
+
'Use **bold** to highlight 1–3 key terms per paragraph (NOT entire sentences). ' +
|
|
243
|
+
'Use *italics* for definitions, counter-points, or light emphasis (1 per paragraph max). ' +
|
|
244
|
+
'NO bullet points, NO markdown headers, NO numbered lists. ' +
|
|
245
|
+
'Each paragraph covers ONE focused idea: e.g. context → main argument → implication. ' +
|
|
246
|
+
'Do NOT start consecutive paragraphs with the same word. Do NOT cut text short mid-sentence.',
|
|
206
247
|
)
|
|
207
248
|
.min(300)
|
|
208
|
-
.max(
|
|
249
|
+
.max(800),
|
|
209
250
|
version: z.literal(1),
|
|
210
251
|
}) satisfies z.ZodType<ITextSlideDataStructure>;
|
|
211
252
|
export type TextSlideData = z.infer<typeof TextSlideDataSchema>;
|
|
@@ -237,24 +278,53 @@ export type ContentsSlideData = z.infer<typeof ContentsSlideDataSchema>;
|
|
|
237
278
|
export const ImageSlideDataSchema = z
|
|
238
279
|
.object({
|
|
239
280
|
contentType: z.literal(SLIDE_CONTENT_TYPE.TEXT_WITH_IMAGE),
|
|
240
|
-
title: z
|
|
241
|
-
description: z
|
|
281
|
+
title: z
|
|
242
282
|
.string()
|
|
243
|
-
.describe(
|
|
283
|
+
.describe(
|
|
284
|
+
'Slide headline rendered in very large bold font on the LEFT column. Keep to 3–7 words (max 70 characters). Aim for under 50 characters to avoid overflow. A noun phrase or short declarative phrase — NOT a full sentence.',
|
|
285
|
+
)
|
|
244
286
|
.min(10)
|
|
287
|
+
.max(70),
|
|
288
|
+
description: z
|
|
289
|
+
.string()
|
|
290
|
+
.describe(
|
|
291
|
+
'Expository prose in 2 paragraphs separated by \\n\\n (double newline). Total length 150–500 characters. ' +
|
|
292
|
+
'Use **bold** for 1–2 key terms per paragraph (NOT entire sentences). ' +
|
|
293
|
+
'Use *italics* for definitions or emphasis at most once per paragraph. ' +
|
|
294
|
+
'NO bullet points, NO headers, NO numbered lists. ' +
|
|
295
|
+
'Each paragraph covers ONE focused idea. NEVER reference or describe the image in the text. ' +
|
|
296
|
+
'The image provides visual atmosphere — the text must stand alone as complete, readable prose.',
|
|
297
|
+
)
|
|
298
|
+
.min(150)
|
|
245
299
|
.max(500),
|
|
246
300
|
imageSlot: ImageSlotSchema,
|
|
247
301
|
version: z.literal(1),
|
|
248
302
|
})
|
|
249
303
|
.describe(
|
|
250
|
-
'Slide
|
|
304
|
+
'Slide with a large title and prose description on the left, and a full-bleed supporting image on the right.',
|
|
251
305
|
) satisfies z.ZodType<IImageSlideDataStructure>;
|
|
252
306
|
export type ImageSlideData = z.infer<typeof ImageSlideDataSchema>;
|
|
253
307
|
|
|
254
308
|
export const SectionBreakSlideDataSchema = z.object({
|
|
255
309
|
contentType: z.literal(SLIDE_CONTENT_TYPE.SECTION_BREAK),
|
|
256
|
-
title: z
|
|
257
|
-
|
|
310
|
+
title: z
|
|
311
|
+
.string()
|
|
312
|
+
.describe(
|
|
313
|
+
'The section name — a clean noun phrase of 3–6 words that names the thematic block which follows. ' +
|
|
314
|
+
'NEVER prefix with "Раздел:", "Section:", "Part:", "Глава:", or any structural label. ' +
|
|
315
|
+
'NEVER include numbers. Just the name itself. ' +
|
|
316
|
+
'GOOD: "Технологические достижения". BAD: "Раздел 2: Технологические достижения".',
|
|
317
|
+
)
|
|
318
|
+
.min(5)
|
|
319
|
+
.max(60),
|
|
320
|
+
description: z
|
|
321
|
+
.string()
|
|
322
|
+
.describe(
|
|
323
|
+
'One sentence (up to 100 characters) that briefly hints at the content of the upcoming section. ' +
|
|
324
|
+
'Should complement the title without repeating it. No markdown, no labels.',
|
|
325
|
+
)
|
|
326
|
+
.min(10)
|
|
327
|
+
.max(120),
|
|
258
328
|
version: z.literal(1),
|
|
259
329
|
}) satisfies z.ZodType<ISectionBreakSlideDataStructure>;
|
|
260
330
|
export type SectionBreakSlideData = z.infer<typeof SectionBreakSlideDataSchema>;
|
|
@@ -263,25 +333,73 @@ export const TableSlideDataSchema = z.object({
|
|
|
263
333
|
contentType: z.literal(SLIDE_CONTENT_TYPE.TABLE),
|
|
264
334
|
title: z
|
|
265
335
|
.string()
|
|
266
|
-
.describe(
|
|
336
|
+
.describe(
|
|
337
|
+
'Table name — 2–4 words rendered as large bold heading above the table. ' +
|
|
338
|
+
'Doubles as both the slide title and the table heading. Keep concise.',
|
|
339
|
+
)
|
|
340
|
+
.min(5)
|
|
341
|
+
.max(55),
|
|
342
|
+
description: z
|
|
343
|
+
.string()
|
|
344
|
+
.describe(
|
|
345
|
+
'One short sentence (max 80 characters) describing what the table shows. ' +
|
|
346
|
+
'Rendered in small gray text below the title. No markdown.',
|
|
347
|
+
)
|
|
267
348
|
.min(10)
|
|
268
|
-
.max(
|
|
269
|
-
description: z.string().describe('Description of the table represents').min(10).max(200),
|
|
349
|
+
.max(100),
|
|
270
350
|
table: z.object({
|
|
271
351
|
columnHeaders: z
|
|
272
|
-
.array(
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
352
|
+
.array(
|
|
353
|
+
z
|
|
354
|
+
.string()
|
|
355
|
+
.min(1)
|
|
356
|
+
.max(20)
|
|
357
|
+
.describe(
|
|
358
|
+
'Column label. Keep SHORT — 1–3 words. Include units here (e.g., "Сумма, ₽"), not in cells. ' +
|
|
359
|
+
'When hasRowHeaders is true, the first header should be a single space " " or a short category label.',
|
|
360
|
+
),
|
|
361
|
+
)
|
|
362
|
+
.min(2)
|
|
363
|
+
.max(5)
|
|
364
|
+
.describe(
|
|
365
|
+
'Column header labels. MAXIMUM 5 columns total. Recommended 3–4 data columns. ' +
|
|
366
|
+
'More columns will overflow the slide — NEVER exceed 5.',
|
|
367
|
+
),
|
|
276
368
|
rows: z
|
|
277
|
-
.array(
|
|
278
|
-
|
|
369
|
+
.array(
|
|
370
|
+
z
|
|
371
|
+
.array(
|
|
372
|
+
z
|
|
373
|
+
.string()
|
|
374
|
+
.min(1)
|
|
375
|
+
.max(40)
|
|
376
|
+
.describe(
|
|
377
|
+
'Cell content. NUMERIC tables: numbers only (e.g., "1 200", "85%"). ' +
|
|
378
|
+
'TEXTUAL tables: 1–3 words maximum — keywords or short phrases ONLY, NEVER full sentences. ' +
|
|
379
|
+
'Row header cells (first cell when hasRowHeaders=true): category label, max 22 characters.',
|
|
380
|
+
),
|
|
381
|
+
)
|
|
382
|
+
.describe('One row. Cell count MUST equal columnHeaders length exactly.'),
|
|
383
|
+
)
|
|
384
|
+
.min(2)
|
|
279
385
|
.max(4)
|
|
280
386
|
.describe(
|
|
281
|
-
'Table rows
|
|
387
|
+
'Table rows. Max 4 rows total. ' +
|
|
388
|
+
'When hasSummaryRow is true, the LAST row is the summary row — so at most 3 regular rows + 1 summary = 4 total. ' +
|
|
389
|
+
'NEVER exceed 4 rows.',
|
|
390
|
+
),
|
|
391
|
+
hasRowHeaders: z
|
|
392
|
+
.boolean()
|
|
393
|
+
.describe(
|
|
394
|
+
'True when the first cell of each row is a descriptive label or category (pivot table). ' +
|
|
395
|
+
'False for plain data tables where all cells are equivalent data.',
|
|
396
|
+
),
|
|
397
|
+
hasSummaryRow: z
|
|
398
|
+
.boolean()
|
|
399
|
+
.describe(
|
|
400
|
+
'True when the last row contains totals, averages, or aggregated values. ' +
|
|
401
|
+
'That summary row must be the last element of the rows array.',
|
|
282
402
|
),
|
|
283
|
-
hasRowHeaders: z.boolean().describe('If table needs special row headers, set this to true'),
|
|
284
|
-
hasSummaryRow: z.boolean().describe('If table needs a summary row, set this to true'),
|
|
285
403
|
}),
|
|
286
404
|
version: z.literal(1),
|
|
287
405
|
}) satisfies z.ZodType<ITableSlideDataStructure>;
|
|
@@ -291,37 +409,85 @@ export type TableSlideData = z.infer<typeof TableSlideDataSchema>;
|
|
|
291
409
|
export const BarChartSlideDataSchema = z.object({
|
|
292
410
|
type: z.literal(SLIDE_CHART_TYPE.BAR),
|
|
293
411
|
categories: z
|
|
294
|
-
.array(z.string())
|
|
295
|
-
.min(
|
|
296
|
-
.max(
|
|
297
|
-
.describe(
|
|
412
|
+
.array(z.string().min(1).max(20))
|
|
413
|
+
.min(3)
|
|
414
|
+
.max(10)
|
|
415
|
+
.describe(
|
|
416
|
+
'Category labels (e.g., months, product names, departments). ' +
|
|
417
|
+
'Recommended: 4–8 items. Keep each label SHORT — 1–3 words, max 15 characters. ' +
|
|
418
|
+
'Categories work best when naturally ordered: time periods, rankings, or comparable groups.',
|
|
419
|
+
),
|
|
298
420
|
series: z
|
|
299
421
|
.array(
|
|
300
422
|
z.object({
|
|
301
423
|
name: z
|
|
302
424
|
.string()
|
|
303
|
-
.
|
|
304
|
-
|
|
425
|
+
.max(40)
|
|
426
|
+
.describe(
|
|
427
|
+
'Series name shown in the chart legend. Do NOT include units here — units belong in the unit field. ' +
|
|
428
|
+
'GOOD: "Рост продаж". BAD: "Рост продаж (%)" or "Выручка (₽)".',
|
|
429
|
+
),
|
|
430
|
+
data: z
|
|
431
|
+
.array(z.number())
|
|
432
|
+
.min(3)
|
|
433
|
+
.describe(
|
|
434
|
+
'Numeric values corresponding to categories. ' +
|
|
435
|
+
'MUST have EXACTLY the same number of values as categories — mismatch will break the chart. ' +
|
|
436
|
+
'Use round numbers or simple approximations. NEVER hallucinate precise figures. ' +
|
|
437
|
+
'Values should show meaningful variation — avoid all bars being the same height.',
|
|
438
|
+
),
|
|
305
439
|
type: z
|
|
306
440
|
.number()
|
|
307
441
|
.min(0)
|
|
308
442
|
.max(11)
|
|
309
|
-
.describe(
|
|
443
|
+
.describe(
|
|
444
|
+
'Color index from the theme palette. ALWAYS use 0 (primary blue). Never change this value.',
|
|
445
|
+
),
|
|
310
446
|
}),
|
|
311
447
|
)
|
|
312
448
|
.min(1)
|
|
313
449
|
.max(1)
|
|
314
|
-
.describe('Data series
|
|
315
|
-
yAxisLabel: z
|
|
316
|
-
|
|
450
|
+
.describe('Data series. Only ONE series is supported. Never add more than one.'),
|
|
451
|
+
yAxisLabel: z
|
|
452
|
+
.string()
|
|
453
|
+
.max(30)
|
|
454
|
+
.optional()
|
|
455
|
+
.describe(
|
|
456
|
+
'Y-axis label. Include ONLY when the axis needs a descriptor that is not already covered by the unit field. ' +
|
|
457
|
+
'GOOD use: "Количество студентов" (when there is no unit symbol). ' +
|
|
458
|
+
'OMIT when unit is set (e.g., "%", "₽") — the unit already contextualises the values.',
|
|
459
|
+
),
|
|
460
|
+
unit: z
|
|
461
|
+
.string()
|
|
462
|
+
.max(10)
|
|
463
|
+
.optional()
|
|
464
|
+
.describe(
|
|
465
|
+
'Unit symbol displayed with each bar value (e.g., "%", "₽", "шт.", "млн"). ' +
|
|
466
|
+
'ALWAYS include when values represent percentages, currency, or any measurable quantity with a unit. ' +
|
|
467
|
+
'Omit only for dimensionless counts that are self-explanatory (e.g., raw ranking scores without a fixed scale).',
|
|
468
|
+
),
|
|
317
469
|
version: z.literal(1),
|
|
318
470
|
}) satisfies z.ZodType<IBarChartSlideDataStructure>;
|
|
319
471
|
export type BarChartSlideData = z.infer<typeof BarChartSlideDataSchema>;
|
|
320
472
|
|
|
321
473
|
export const ChartSlideDataSchema = z.object({
|
|
322
474
|
contentType: z.literal(SLIDE_CONTENT_TYPE.CHART),
|
|
323
|
-
title: z
|
|
324
|
-
|
|
475
|
+
title: z
|
|
476
|
+
.string()
|
|
477
|
+
.describe(
|
|
478
|
+
'Chart name — 2–4 words rendered as large bold heading on the LEFT panel of the slide. ' +
|
|
479
|
+
'Keep short: the left panel is narrow and the title font is very large.',
|
|
480
|
+
)
|
|
481
|
+
.min(5)
|
|
482
|
+
.max(50),
|
|
483
|
+
description: z
|
|
484
|
+
.string()
|
|
485
|
+
.describe(
|
|
486
|
+
'1–2 sentences (max 120 characters) explaining what the chart shows. ' +
|
|
487
|
+
'Rendered in small gray text below the title on the LEFT panel. No markdown.',
|
|
488
|
+
)
|
|
489
|
+
.min(10)
|
|
490
|
+
.max(150),
|
|
325
491
|
chart: z.discriminatedUnion('type', [BarChartSlideDataSchema]),
|
|
326
492
|
version: z.literal(1),
|
|
327
493
|
}) satisfies z.ZodType<IChartSlideDataStructure>;
|
|
@@ -329,8 +495,22 @@ export type ChartSlideData = z.infer<typeof ChartSlideDataSchema>;
|
|
|
329
495
|
|
|
330
496
|
export const TimelineSlideDataSchema = z.object({
|
|
331
497
|
contentType: z.literal(SLIDE_CONTENT_TYPE.TIMELINE),
|
|
332
|
-
title: z
|
|
333
|
-
|
|
498
|
+
title: z
|
|
499
|
+
.string()
|
|
500
|
+
.describe(
|
|
501
|
+
'Timeline name — 2–5 words, rendered as large bold heading above the timeline. ' +
|
|
502
|
+
'Names the subject or scope of the chronological sequence.',
|
|
503
|
+
)
|
|
504
|
+
.min(5)
|
|
505
|
+
.max(65),
|
|
506
|
+
description: z
|
|
507
|
+
.string()
|
|
508
|
+
.describe(
|
|
509
|
+
'One sentence (max 100 characters) providing context for the timeline. ' +
|
|
510
|
+
'Rendered in small gray text below the title. No markdown.',
|
|
511
|
+
)
|
|
512
|
+
.min(10)
|
|
513
|
+
.max(120),
|
|
334
514
|
timeline: z.object({
|
|
335
515
|
events: z
|
|
336
516
|
.array(
|
|
@@ -338,26 +518,40 @@ export const TimelineSlideDataSchema = z.object({
|
|
|
338
518
|
date: z
|
|
339
519
|
.string()
|
|
340
520
|
.describe(
|
|
341
|
-
'
|
|
521
|
+
'Temporal label displayed inside the arrow/chevron shape at the top of each column. ' +
|
|
522
|
+
'MUST be SHORT — max 20 characters — to fit inside the arrow. ' +
|
|
523
|
+
'Use a year ("2015"), a range ("2010–2015"), a quarter ("Q1 2023"), ' +
|
|
524
|
+
'an approximate period ("Early 2020s", "Середина 2010-х"), ' +
|
|
525
|
+
'or a phase label ("Этап 1", "Запуск") for process timelines. ' +
|
|
526
|
+
'NEVER fabricate specific dates you are not certain about.',
|
|
342
527
|
)
|
|
343
528
|
.min(2)
|
|
344
|
-
.max(
|
|
529
|
+
.max(25),
|
|
345
530
|
title: z
|
|
346
531
|
.string()
|
|
347
532
|
.describe(
|
|
348
|
-
'Event
|
|
533
|
+
'Event name in bold below the arrow. 2–3 words maximum. ' +
|
|
534
|
+
'Short and punchy — the column is narrow, long titles wrap to many lines. ' +
|
|
535
|
+
'GOOD: "Первый запуск", "Выход на рынок". BAD: "Успешный выход компании на международный рынок".',
|
|
349
536
|
)
|
|
350
|
-
.min(
|
|
351
|
-
.max(
|
|
537
|
+
.min(3)
|
|
538
|
+
.max(35),
|
|
352
539
|
description: z
|
|
353
540
|
.string()
|
|
354
|
-
.describe(
|
|
541
|
+
.describe(
|
|
542
|
+
'Brief description below the event title. 1–2 sentences, max 100 characters. ' +
|
|
543
|
+
'The column is narrow — text wraps to ~5 lines at this limit. ' +
|
|
544
|
+
'Do NOT exceed 100 characters or the description will overflow off the slide.',
|
|
545
|
+
)
|
|
355
546
|
.min(20)
|
|
356
|
-
.max(
|
|
547
|
+
.max(110),
|
|
357
548
|
}),
|
|
358
549
|
)
|
|
359
|
-
.length(
|
|
360
|
-
.describe(
|
|
550
|
+
.length(5)
|
|
551
|
+
.describe(
|
|
552
|
+
'Exactly 5 chronological events in sequential order (oldest → newest). ' +
|
|
553
|
+
'The template renders exactly 5 equal columns — NEVER generate fewer or more.',
|
|
554
|
+
),
|
|
361
555
|
}),
|
|
362
556
|
version: z.literal(1),
|
|
363
557
|
}) satisfies z.ZodType<ITimelineSlideDataStructure>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common';
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { PresentationConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetPresentationConfigQuery {
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
6
9
|
export const ResponseSchema = ICommandResponseSchema(PresentationConfigSchema);
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ICommandResponseSchema } from '../../common';
|
|
2
|
+
import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
|
|
3
3
|
import { SolvingEduTaskConfigSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetSolvingEduTaskConfigQuery {
|
|
6
|
-
export const RequestSchema =
|
|
6
|
+
export const RequestSchema = LocaleRequestSchema;
|
|
7
7
|
export type Request = z.infer<typeof RequestSchema>;
|
|
8
8
|
|
|
9
9
|
export const ResponseSchema = ICommandResponseSchema(SolvingEduTaskConfigSchema);
|