@purpleschool/student-works 1.2.2 → 1.3.1
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/api/controller/http/index.ts +1 -0
- package/api/controller/http/presentation.ts +37 -0
- package/api/routes.ts +90 -0
- package/build/api/controller/http/index.js +1 -0
- package/build/api/controller/http/presentation.js +33 -0
- package/build/api/routes.js +52 -0
- package/build/commands/index.js +1 -0
- package/build/commands/presentation/build-blank-slide.command.js +16 -0
- package/build/commands/presentation/create-presentation.command.js +17 -0
- package/build/commands/presentation/delete-all-user-presentations.command.js +9 -0
- package/build/commands/presentation/delete-presentation.command.js +11 -0
- package/build/commands/presentation/delete-slide-outline.command.js +12 -0
- package/build/commands/presentation/export-presentation-as-pptx.command.js +17 -0
- package/build/commands/presentation/find-presentation-by-uuid.command.js +14 -0
- package/build/commands/presentation/find-presentation-outline.command.js +14 -0
- package/build/commands/presentation/find-presentations.command.js +18 -0
- package/build/commands/presentation/generate-and-insert-slide.command.js +22 -0
- package/build/commands/presentation/generate-presentation-slides.command.js +14 -0
- package/build/commands/presentation/get-presentation-config.command.js +11 -0
- package/build/commands/presentation/index.js +39 -0
- package/build/commands/presentation/presentation-generate-report.command.js +17 -0
- package/build/commands/presentation/presentation-paraphrase.command.js +20 -0
- package/build/commands/presentation/reposition-slide-outline.command.js +15 -0
- package/build/commands/presentation/set-reaction-to-presentation.command.js +28 -0
- package/build/commands/presentation/update-presentation-outline.command.js +15 -0
- package/build/commands/presentation/update-presentation-slides.command.js +25 -0
- package/build/commands/presentation/update-presentation.command.js +18 -0
- package/build/commands/presentation/update-slide-image-slot.command.js +34 -0
- package/build/commands/presentation/update-slide-outline.command.js +23 -0
- package/build/commands/presentation/update-slide.command.js +19 -0
- package/build/constants/errors/errors.js +236 -0
- package/build/constants/index.js +1 -0
- package/build/constants/presentation/enums/index.js +26 -0
- package/build/constants/presentation/enums/presentation-ai-action-call-status.enum.js +9 -0
- package/build/constants/presentation/enums/presentation-ai-action-pricing-type.enum.js +8 -0
- package/build/constants/presentation/enums/presentation-ai-action-type.enum.js +8 -0
- package/build/constants/presentation/enums/presentation-stage.enum.js +14 -0
- package/build/constants/presentation/enums/slide-content-type.enum.js +16 -0
- package/build/constants/presentation/enums/slide-icon-slot-status.enum.js +10 -0
- package/build/constants/presentation/enums/slide-image-slot-action.enum.js +8 -0
- package/build/constants/presentation/enums/slide-image-slot.status.enum.js +10 -0
- package/build/constants/presentation/enums/slide-layout.enum.js +8 -0
- package/build/constants/presentation/index.js +18 -0
- package/build/constants/presentation/maps/index.js +17 -0
- package/build/constants/presentation/maps/slide-layout-map.constant.js +17 -0
- package/build/helpers/index.js +1 -0
- package/build/helpers/presentation/calculate-presentation-ai-action-price.util.js +16 -0
- package/build/helpers/presentation/index.js +17 -0
- package/build/models/index.js +1 -0
- package/build/models/language.schema.js +11 -0
- package/build/models/presentation/index.js +24 -0
- package/build/models/presentation/pptx-export-payload.schema.js +216 -0
- package/build/models/presentation/presentation-ai-action.schema.js +27 -0
- package/build/models/presentation/presentation-config.schema.js +21 -0
- package/build/models/presentation/presentation-template.schema.js +13 -0
- package/build/models/presentation/presentation.schema.js +28 -0
- package/build/models/presentation/slide-content-edit.schema.js +146 -0
- package/build/models/presentation/slide-content-type.schema.js +14 -0
- package/build/models/presentation/slide-content.schema.js +358 -0
- package/build/models/presentation/slide-icon-slot.schema.js +15 -0
- package/build/models/presentation/slide-image-slot.schema.js +16 -0
- package/build/models/presentation/slide-outline.schema.js +50 -0
- package/build/models/presentation/slide.schema.js +58 -0
- package/commands/index.ts +1 -0
- package/commands/presentation/build-blank-slide.command.ts +18 -0
- package/commands/presentation/create-presentation.command.ts +19 -0
- package/commands/presentation/delete-all-user-presentations.command.ts +9 -0
- package/commands/presentation/delete-presentation.command.ts +13 -0
- package/commands/presentation/delete-slide-outline.command.ts +12 -0
- package/commands/presentation/export-presentation-as-pptx.command.ts +20 -0
- package/commands/presentation/find-presentation-by-uuid.command.ts +16 -0
- package/commands/presentation/find-presentation-outline.command.ts +16 -0
- package/commands/presentation/find-presentations.command.ts +18 -0
- package/commands/presentation/generate-and-insert-slide.command.ts +27 -0
- package/commands/presentation/generate-presentation-slides.command.ts +16 -0
- package/commands/presentation/get-presentation-config.command.ts +10 -0
- package/commands/presentation/index.ts +23 -0
- package/commands/presentation/presentation-generate-report.command.ts +21 -0
- package/commands/presentation/presentation-paraphrase.command.ts +26 -0
- package/commands/presentation/reposition-slide-outline.command.ts +17 -0
- package/commands/presentation/set-reaction-to-presentation.command.ts +33 -0
- package/commands/presentation/update-presentation-outline.command.ts +18 -0
- package/commands/presentation/update-presentation-slides.command.ts +32 -0
- package/commands/presentation/update-presentation.command.ts +21 -0
- package/commands/presentation/update-slide-image-slot.command.ts +40 -0
- package/commands/presentation/update-slide-outline.command.ts +26 -0
- package/commands/presentation/update-slide.command.ts +25 -0
- package/constants/errors/errors.ts +236 -0
- package/constants/index.ts +1 -0
- package/constants/presentation/enums/index.ts +10 -0
- package/constants/presentation/enums/presentation-ai-action-call-status.enum.ts +5 -0
- package/constants/presentation/enums/presentation-ai-action-pricing-type.enum.ts +4 -0
- package/constants/presentation/enums/presentation-ai-action-type.enum.ts +4 -0
- package/constants/presentation/enums/presentation-stage.enum.ts +13 -0
- package/constants/presentation/enums/slide-content-type.enum.ts +12 -0
- package/constants/presentation/enums/slide-icon-slot-status.enum.ts +6 -0
- package/constants/presentation/enums/slide-image-slot-action.enum.ts +4 -0
- package/constants/presentation/enums/slide-image-slot.status.enum.ts +6 -0
- package/constants/presentation/enums/slide-layout.enum.ts +4 -0
- package/constants/presentation/index.ts +2 -0
- package/constants/presentation/maps/index.ts +1 -0
- package/constants/presentation/maps/slide-layout-map.constant.ts +15 -0
- package/helpers/index.ts +1 -0
- package/helpers/presentation/calculate-presentation-ai-action-price.util.ts +20 -0
- package/helpers/presentation/index.ts +1 -0
- package/models/index.ts +1 -0
- package/models/language.schema.ts +9 -0
- package/models/presentation/index.ts +8 -0
- package/models/presentation/pptx-export-payload.schema.ts +246 -0
- package/models/presentation/presentation-ai-action.schema.ts +30 -0
- package/models/presentation/presentation-config.schema.ts +20 -0
- package/models/presentation/presentation-template.schema.ts +11 -0
- package/models/presentation/presentation.schema.ts +29 -0
- package/models/presentation/slide-content-edit.schema.ts +175 -0
- package/models/presentation/slide-content-type.schema.ts +13 -0
- package/models/presentation/slide-content.schema.ts +571 -0
- package/models/presentation/slide-icon-slot.schema.ts +13 -0
- package/models/presentation/slide-image-slot.schema.ts +14 -0
- package/models/presentation/slide-outline.schema.ts +58 -0
- package/models/presentation/slide.schema.ts +66 -0
- package/package.json +2 -2
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlideContentSchema = exports.TimelineSlideDataSchema = exports.ChartSlideDataSchema = exports.BarChartSlideDataSchema = exports.TableSlideDataSchema = exports.SectionBreakSlideDataSchema = exports.ImageSlideDataSchema = exports.ContentsSlideDataSchema = exports.TextSlideDataSchema = exports.StructuredListSlideDataSchema = exports.ThankYouSlideDataSchema = exports.CoverSlideDataSchema = exports.IconSlotSchema = exports.ImageSlotSchema = exports.SLIDE_CHART_TYPE = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
var SLIDE_CHART_TYPE;
|
|
7
|
+
(function (SLIDE_CHART_TYPE) {
|
|
8
|
+
SLIDE_CHART_TYPE["BAR"] = "BAR";
|
|
9
|
+
})(SLIDE_CHART_TYPE || (exports.SLIDE_CHART_TYPE = SLIDE_CHART_TYPE = {}));
|
|
10
|
+
exports.ImageSlotSchema = zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z
|
|
12
|
+
.string()
|
|
13
|
+
.uuid()
|
|
14
|
+
.describe('Generate a valid uuid for image slot, that will be used for future lookups'),
|
|
15
|
+
prompt: zod_1.z
|
|
16
|
+
.string()
|
|
17
|
+
.describe('Image generation prompt. MUST be written in ENGLISH regardless of the presentation language. ' +
|
|
18
|
+
'AI image generators excel at: atmospheric scenes, landscapes, cityscapes, architecture, nature, abstract light and texture, anonymous silhouettes, artistic photography. ' +
|
|
19
|
+
'AI fundamentally cannot render accurately: legible text on any surface, complex diagrams or flowcharts, data charts/graphs, specific product logos, clocks, precise mechanical parts. ' +
|
|
20
|
+
'Choose scene types from the first category. Avoid anything in the second. ' +
|
|
21
|
+
'Structure: [subject/scene] → [mood/atmosphere] → [lighting] → [visual style]. ' +
|
|
22
|
+
'Evoke the emotional register of the slide — do not illustrate the topic literally. ' +
|
|
23
|
+
'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. ' +
|
|
24
|
+
'GOOD: "A lone figure on an observation deck at dusk gazing over an illuminated city. Cinematic wide-angle, golden-hour light, photorealistic." ' +
|
|
25
|
+
'BAD: "A bar chart showing quarterly growth. A robot at a laptop with code on the screen."'),
|
|
26
|
+
});
|
|
27
|
+
exports.IconSlotSchema = zod_1.z.object({
|
|
28
|
+
uuid: zod_1.z
|
|
29
|
+
.string()
|
|
30
|
+
.uuid()
|
|
31
|
+
.describe('Generate a valid uuid for icon slot, that will be used for future lookups'),
|
|
32
|
+
prompt: zod_1.z.string().describe('Provide a search query for an fitting icon. MUST BE IN ENGLISH'),
|
|
33
|
+
});
|
|
34
|
+
exports.CoverSlideDataSchema = zod_1.z.object({
|
|
35
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.COVER),
|
|
36
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
37
|
+
author: zod_1.z.object({
|
|
38
|
+
label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
|
|
39
|
+
value: zod_1.z
|
|
40
|
+
.string()
|
|
41
|
+
.describe('Literal "Author of the presentation" in presentation\'s language'),
|
|
42
|
+
}),
|
|
43
|
+
date: zod_1.z.object({
|
|
44
|
+
label: zod_1.z.string().describe('Literal "Date" in presentation\'s language'),
|
|
45
|
+
value: zod_1.z
|
|
46
|
+
.string()
|
|
47
|
+
.describe('Date of the presentation in the "dd month yyyy" format in presentation\'s locale'),
|
|
48
|
+
}),
|
|
49
|
+
email: zod_1.z.object({
|
|
50
|
+
label: zod_1.z.string().describe('Just default word "Email"'),
|
|
51
|
+
value: zod_1.z.string().describe('Just default "email@example.com"'),
|
|
52
|
+
}),
|
|
53
|
+
version: zod_1.z.literal(1),
|
|
54
|
+
});
|
|
55
|
+
exports.ThankYouSlideDataSchema = zod_1.z.object({
|
|
56
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.THANK_YOU),
|
|
57
|
+
title: zod_1.z
|
|
58
|
+
.string()
|
|
59
|
+
.describe('"Thank you for your attention" in presentation\'s language')
|
|
60
|
+
.min(10)
|
|
61
|
+
.max(150),
|
|
62
|
+
author: zod_1.z.object({
|
|
63
|
+
label: zod_1.z.string().describe('"Author" in presentation\'s language'),
|
|
64
|
+
value: zod_1.z.string().describe('"Author of the presentation" in presentation\'s language'),
|
|
65
|
+
}),
|
|
66
|
+
date: zod_1.z.object({
|
|
67
|
+
label: zod_1.z.string().describe('"Date" in presentation\'s language'),
|
|
68
|
+
value: zod_1.z
|
|
69
|
+
.string()
|
|
70
|
+
.describe('Date of the presentation in the "dd month yyyy" format in presentation\'s locale'),
|
|
71
|
+
}),
|
|
72
|
+
email: zod_1.z.object({
|
|
73
|
+
label: zod_1.z.string().describe('Just default word "Email"'),
|
|
74
|
+
value: zod_1.z.string().describe('Just default "email@example.com"'),
|
|
75
|
+
}),
|
|
76
|
+
version: zod_1.z.literal(1),
|
|
77
|
+
});
|
|
78
|
+
exports.StructuredListSlideDataSchema = zod_1.z.object({
|
|
79
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.STRUCTURED_LIST),
|
|
80
|
+
title: zod_1.z
|
|
81
|
+
.string()
|
|
82
|
+
.describe('Slide headline — 2–4 words naming the group. A noun phrase, NOT a full sentence. Displayed in very large font on the left panel.')
|
|
83
|
+
.min(5)
|
|
84
|
+
.max(40),
|
|
85
|
+
description: zod_1.z
|
|
86
|
+
.string()
|
|
87
|
+
.describe('One framing sentence answering "What are these 4 things about?". Displayed in small text below the title on the left panel.')
|
|
88
|
+
.min(30)
|
|
89
|
+
.max(80),
|
|
90
|
+
list: zod_1.z
|
|
91
|
+
.array(zod_1.z.object({
|
|
92
|
+
title: zod_1.z
|
|
93
|
+
.string()
|
|
94
|
+
.describe('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).')
|
|
95
|
+
.min(3)
|
|
96
|
+
.max(30),
|
|
97
|
+
description: zod_1.z
|
|
98
|
+
.string()
|
|
99
|
+
.describe('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.')
|
|
100
|
+
.min(50)
|
|
101
|
+
.max(100),
|
|
102
|
+
}))
|
|
103
|
+
.length(4),
|
|
104
|
+
version: zod_1.z.literal(1),
|
|
105
|
+
});
|
|
106
|
+
exports.TextSlideDataSchema = zod_1.z.object({
|
|
107
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TEXT),
|
|
108
|
+
title: zod_1.z
|
|
109
|
+
.string()
|
|
110
|
+
.describe('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.')
|
|
111
|
+
.min(10)
|
|
112
|
+
.max(70),
|
|
113
|
+
description: zod_1.z
|
|
114
|
+
.string()
|
|
115
|
+
.describe('Expository prose split into 2–3 paragraphs separated by \\n\\n (double newline). Total length 300–800 characters. ' +
|
|
116
|
+
'Use **bold** to highlight 1–3 key terms per paragraph (NOT entire sentences). ' +
|
|
117
|
+
'Use *italics* for definitions, counter-points, or light emphasis (1 per paragraph max). ' +
|
|
118
|
+
'NO bullet points, NO markdown headers, NO numbered lists. ' +
|
|
119
|
+
'Each paragraph covers ONE focused idea: e.g. context → main argument → implication. ' +
|
|
120
|
+
'Do NOT start consecutive paragraphs with the same word. Do NOT cut text short mid-sentence.')
|
|
121
|
+
.min(300)
|
|
122
|
+
.max(800),
|
|
123
|
+
version: zod_1.z.literal(1),
|
|
124
|
+
});
|
|
125
|
+
exports.ContentsSlideDataSchema = zod_1.z.object({
|
|
126
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.CONTENTS),
|
|
127
|
+
title: zod_1.z
|
|
128
|
+
.string()
|
|
129
|
+
.describe('This slide represents table of contents for the presentation and must be named "Contents" in the presentation language')
|
|
130
|
+
.min(10)
|
|
131
|
+
.max(200),
|
|
132
|
+
items: zod_1.z
|
|
133
|
+
.array(zod_1.z.object({
|
|
134
|
+
pageNumber: zod_1.z.number().describe('Page number of the slide'),
|
|
135
|
+
title: zod_1.z.string().min(1).describe('Title of the slide on said page'),
|
|
136
|
+
}))
|
|
137
|
+
.min(1)
|
|
138
|
+
.describe('List of slide titles. Must be relevant and generated after all the slides are generated'),
|
|
139
|
+
version: zod_1.z.literal(1),
|
|
140
|
+
});
|
|
141
|
+
exports.ImageSlideDataSchema = zod_1.z
|
|
142
|
+
.object({
|
|
143
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TEXT_WITH_IMAGE),
|
|
144
|
+
title: zod_1.z
|
|
145
|
+
.string()
|
|
146
|
+
.describe('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.')
|
|
147
|
+
.min(10)
|
|
148
|
+
.max(70),
|
|
149
|
+
description: zod_1.z
|
|
150
|
+
.string()
|
|
151
|
+
.describe('Expository prose in 2 paragraphs separated by \\n\\n (double newline). Total length 150–500 characters. ' +
|
|
152
|
+
'Use **bold** for 1–2 key terms per paragraph (NOT entire sentences). ' +
|
|
153
|
+
'Use *italics* for definitions or emphasis at most once per paragraph. ' +
|
|
154
|
+
'NO bullet points, NO headers, NO numbered lists. ' +
|
|
155
|
+
'Each paragraph covers ONE focused idea. NEVER reference or describe the image in the text. ' +
|
|
156
|
+
'The image provides visual atmosphere — the text must stand alone as complete, readable prose.')
|
|
157
|
+
.min(150)
|
|
158
|
+
.max(500),
|
|
159
|
+
imageSlot: exports.ImageSlotSchema,
|
|
160
|
+
version: zod_1.z.literal(1),
|
|
161
|
+
})
|
|
162
|
+
.describe('Slide with a large title and prose description on the left, and a full-bleed supporting image on the right.');
|
|
163
|
+
exports.SectionBreakSlideDataSchema = zod_1.z.object({
|
|
164
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.SECTION_BREAK),
|
|
165
|
+
title: zod_1.z
|
|
166
|
+
.string()
|
|
167
|
+
.describe('The section name — a clean noun phrase of 3–6 words that names the thematic block which follows. ' +
|
|
168
|
+
'NEVER prefix with "Раздел:", "Section:", "Part:", "Глава:", or any structural label. ' +
|
|
169
|
+
'NEVER include numbers. Just the name itself. ' +
|
|
170
|
+
'GOOD: "Технологические достижения". BAD: "Раздел 2: Технологические достижения".')
|
|
171
|
+
.min(5)
|
|
172
|
+
.max(60),
|
|
173
|
+
description: zod_1.z
|
|
174
|
+
.string()
|
|
175
|
+
.describe('One sentence (up to 100 characters) that briefly hints at the content of the upcoming section. ' +
|
|
176
|
+
'Should complement the title without repeating it. No markdown, no labels.')
|
|
177
|
+
.min(10)
|
|
178
|
+
.max(120),
|
|
179
|
+
version: zod_1.z.literal(1),
|
|
180
|
+
});
|
|
181
|
+
exports.TableSlideDataSchema = zod_1.z.object({
|
|
182
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TABLE),
|
|
183
|
+
title: zod_1.z
|
|
184
|
+
.string()
|
|
185
|
+
.describe('Table name — 2–4 words rendered as large bold heading above the table. ' +
|
|
186
|
+
'Doubles as both the slide title and the table heading. Keep concise.')
|
|
187
|
+
.min(5)
|
|
188
|
+
.max(55),
|
|
189
|
+
description: zod_1.z
|
|
190
|
+
.string()
|
|
191
|
+
.describe('One short sentence (max 80 characters) describing what the table shows. ' +
|
|
192
|
+
'Rendered in small gray text below the title. No markdown.')
|
|
193
|
+
.min(10)
|
|
194
|
+
.max(100),
|
|
195
|
+
table: zod_1.z.object({
|
|
196
|
+
columnHeaders: zod_1.z
|
|
197
|
+
.array(zod_1.z
|
|
198
|
+
.string()
|
|
199
|
+
.min(1)
|
|
200
|
+
.max(20)
|
|
201
|
+
.describe('Column label. Keep SHORT — 1–3 words. Include units here (e.g., "Сумма, ₽"), not in cells. ' +
|
|
202
|
+
'When hasRowHeaders is true, the first header should be a single space " " or a short category label.'))
|
|
203
|
+
.min(2)
|
|
204
|
+
.max(5)
|
|
205
|
+
.describe('Column header labels. MAXIMUM 5 columns total. Recommended 3–4 data columns. ' +
|
|
206
|
+
'More columns will overflow the slide — NEVER exceed 5.'),
|
|
207
|
+
rows: zod_1.z
|
|
208
|
+
.array(zod_1.z
|
|
209
|
+
.array(zod_1.z
|
|
210
|
+
.string()
|
|
211
|
+
.min(1)
|
|
212
|
+
.max(40)
|
|
213
|
+
.describe('Cell content. NUMERIC tables: numbers only (e.g., "1 200", "85%"). ' +
|
|
214
|
+
'TEXTUAL tables: 1–3 words maximum — keywords or short phrases ONLY, NEVER full sentences. ' +
|
|
215
|
+
'Row header cells (first cell when hasRowHeaders=true): category label, max 22 characters.'))
|
|
216
|
+
.describe('One row. Cell count MUST equal columnHeaders length exactly.'))
|
|
217
|
+
.min(2)
|
|
218
|
+
.max(4)
|
|
219
|
+
.describe('Table rows. Max 4 rows total. ' +
|
|
220
|
+
'When hasSummaryRow is true, the LAST row is the summary row — so at most 3 regular rows + 1 summary = 4 total. ' +
|
|
221
|
+
'NEVER exceed 4 rows.'),
|
|
222
|
+
hasRowHeaders: zod_1.z
|
|
223
|
+
.boolean()
|
|
224
|
+
.describe('True when the first cell of each row is a descriptive label or category (pivot table). ' +
|
|
225
|
+
'False for plain data tables where all cells are equivalent data.'),
|
|
226
|
+
hasSummaryRow: zod_1.z
|
|
227
|
+
.boolean()
|
|
228
|
+
.describe('True when the last row contains totals, averages, or aggregated values. ' +
|
|
229
|
+
'That summary row must be the last element of the rows array.'),
|
|
230
|
+
}),
|
|
231
|
+
version: zod_1.z.literal(1),
|
|
232
|
+
});
|
|
233
|
+
// Charts
|
|
234
|
+
exports.BarChartSlideDataSchema = zod_1.z.object({
|
|
235
|
+
type: zod_1.z.literal(SLIDE_CHART_TYPE.BAR),
|
|
236
|
+
categories: zod_1.z
|
|
237
|
+
.array(zod_1.z.string().min(1).max(20))
|
|
238
|
+
.min(3)
|
|
239
|
+
.max(10)
|
|
240
|
+
.describe('Category labels (e.g., months, product names, departments). ' +
|
|
241
|
+
'Recommended: 4–8 items. Keep each label SHORT — 1–3 words, max 15 characters. ' +
|
|
242
|
+
'Categories work best when naturally ordered: time periods, rankings, or comparable groups.'),
|
|
243
|
+
series: zod_1.z
|
|
244
|
+
.array(zod_1.z.object({
|
|
245
|
+
name: zod_1.z
|
|
246
|
+
.string()
|
|
247
|
+
.max(40)
|
|
248
|
+
.describe('Series name shown in the chart legend. Do NOT include units here — units belong in the unit field. ' +
|
|
249
|
+
'GOOD: "Рост продаж". BAD: "Рост продаж (%)" or "Выручка (₽)".'),
|
|
250
|
+
data: zod_1.z
|
|
251
|
+
.array(zod_1.z.number())
|
|
252
|
+
.min(3)
|
|
253
|
+
.describe('Numeric values corresponding to categories. ' +
|
|
254
|
+
'MUST have EXACTLY the same number of values as categories — mismatch will break the chart. ' +
|
|
255
|
+
'Use round numbers or simple approximations. NEVER hallucinate precise figures. ' +
|
|
256
|
+
'Values should show meaningful variation — avoid all bars being the same height.'),
|
|
257
|
+
type: zod_1.z
|
|
258
|
+
.number()
|
|
259
|
+
.min(0)
|
|
260
|
+
.max(11)
|
|
261
|
+
.describe('Color index from the theme palette. ALWAYS use 0 (primary blue). Never change this value.'),
|
|
262
|
+
}))
|
|
263
|
+
.min(1)
|
|
264
|
+
.max(1)
|
|
265
|
+
.describe('Data series. Only ONE series is supported. Never add more than one.'),
|
|
266
|
+
yAxisLabel: zod_1.z
|
|
267
|
+
.string()
|
|
268
|
+
.max(30)
|
|
269
|
+
.optional()
|
|
270
|
+
.describe('Y-axis label. Include ONLY when the axis needs a descriptor that is not already covered by the unit field. ' +
|
|
271
|
+
'GOOD use: "Количество студентов" (when there is no unit symbol). ' +
|
|
272
|
+
'OMIT when unit is set (e.g., "%", "₽") — the unit already contextualises the values.'),
|
|
273
|
+
unit: zod_1.z
|
|
274
|
+
.string()
|
|
275
|
+
.max(10)
|
|
276
|
+
.optional()
|
|
277
|
+
.describe('Unit symbol displayed with each bar value (e.g., "%", "₽", "шт.", "млн"). ' +
|
|
278
|
+
'ALWAYS include when values represent percentages, currency, or any measurable quantity with a unit. ' +
|
|
279
|
+
'Omit only for dimensionless counts that are self-explanatory (e.g., raw ranking scores without a fixed scale).'),
|
|
280
|
+
version: zod_1.z.literal(1),
|
|
281
|
+
});
|
|
282
|
+
exports.ChartSlideDataSchema = zod_1.z.object({
|
|
283
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.CHART),
|
|
284
|
+
title: zod_1.z
|
|
285
|
+
.string()
|
|
286
|
+
.describe('Chart name — 2–4 words rendered as large bold heading on the LEFT panel of the slide. ' +
|
|
287
|
+
'Keep short: the left panel is narrow and the title font is very large.')
|
|
288
|
+
.min(5)
|
|
289
|
+
.max(50),
|
|
290
|
+
description: zod_1.z
|
|
291
|
+
.string()
|
|
292
|
+
.describe('1–2 sentences (max 120 characters) explaining what the chart shows. ' +
|
|
293
|
+
'Rendered in small gray text below the title on the LEFT panel. No markdown.')
|
|
294
|
+
.min(10)
|
|
295
|
+
.max(150),
|
|
296
|
+
chart: zod_1.z.discriminatedUnion('type', [exports.BarChartSlideDataSchema]),
|
|
297
|
+
version: zod_1.z.literal(1),
|
|
298
|
+
});
|
|
299
|
+
exports.TimelineSlideDataSchema = zod_1.z.object({
|
|
300
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TIMELINE),
|
|
301
|
+
title: zod_1.z
|
|
302
|
+
.string()
|
|
303
|
+
.describe('Timeline name — 2–5 words, rendered as large bold heading above the timeline. ' +
|
|
304
|
+
'Names the subject or scope of the chronological sequence.')
|
|
305
|
+
.min(5)
|
|
306
|
+
.max(65),
|
|
307
|
+
description: zod_1.z
|
|
308
|
+
.string()
|
|
309
|
+
.describe('One sentence (max 100 characters) providing context for the timeline. ' +
|
|
310
|
+
'Rendered in small gray text below the title. No markdown.')
|
|
311
|
+
.min(10)
|
|
312
|
+
.max(120),
|
|
313
|
+
timeline: zod_1.z.object({
|
|
314
|
+
events: zod_1.z
|
|
315
|
+
.array(zod_1.z.object({
|
|
316
|
+
date: zod_1.z
|
|
317
|
+
.string()
|
|
318
|
+
.describe('Temporal label displayed inside the arrow/chevron shape at the top of each column. ' +
|
|
319
|
+
'MUST be SHORT — max 20 characters — to fit inside the arrow. ' +
|
|
320
|
+
'Use a year ("2015"), a range ("2010–2015"), a quarter ("Q1 2023"), ' +
|
|
321
|
+
'an approximate period ("Early 2020s", "Середина 2010-х"), ' +
|
|
322
|
+
'or a phase label ("Этап 1", "Запуск") for process timelines. ' +
|
|
323
|
+
'NEVER fabricate specific dates you are not certain about.')
|
|
324
|
+
.min(2)
|
|
325
|
+
.max(25),
|
|
326
|
+
title: zod_1.z
|
|
327
|
+
.string()
|
|
328
|
+
.describe('Event name in bold below the arrow. 2–3 words maximum. ' +
|
|
329
|
+
'Short and punchy — the column is narrow, long titles wrap to many lines. ' +
|
|
330
|
+
'GOOD: "Первый запуск", "Выход на рынок". BAD: "Успешный выход компании на международный рынок".')
|
|
331
|
+
.min(3)
|
|
332
|
+
.max(35),
|
|
333
|
+
description: zod_1.z
|
|
334
|
+
.string()
|
|
335
|
+
.describe('Brief description below the event title. 1–2 sentences, max 100 characters. ' +
|
|
336
|
+
'The column is narrow — text wraps to ~5 lines at this limit. ' +
|
|
337
|
+
'Do NOT exceed 100 characters or the description will overflow off the slide.')
|
|
338
|
+
.min(20)
|
|
339
|
+
.max(110),
|
|
340
|
+
}))
|
|
341
|
+
.length(5)
|
|
342
|
+
.describe('Exactly 5 chronological events in sequential order (oldest → newest). ' +
|
|
343
|
+
'The template renders exactly 5 equal columns — NEVER generate fewer or more.'),
|
|
344
|
+
}),
|
|
345
|
+
version: zod_1.z.literal(1),
|
|
346
|
+
});
|
|
347
|
+
exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
348
|
+
exports.CoverSlideDataSchema,
|
|
349
|
+
exports.StructuredListSlideDataSchema,
|
|
350
|
+
exports.TextSlideDataSchema,
|
|
351
|
+
exports.ContentsSlideDataSchema,
|
|
352
|
+
exports.SectionBreakSlideDataSchema,
|
|
353
|
+
exports.ImageSlideDataSchema,
|
|
354
|
+
exports.ThankYouSlideDataSchema,
|
|
355
|
+
exports.TableSlideDataSchema,
|
|
356
|
+
exports.ChartSlideDataSchema,
|
|
357
|
+
exports.TimelineSlideDataSchema,
|
|
358
|
+
]);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlideIconSlotSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.SlideIconSlotSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
prompt: zod_1.z.string(),
|
|
9
|
+
alt: zod_1.z.string(),
|
|
10
|
+
url: zod_1.z.string().nullable(),
|
|
11
|
+
slideId: zod_1.z.string(),
|
|
12
|
+
status: zod_1.z.nativeEnum(constants_1.SLIDE_ICON_SLOT_STATUS),
|
|
13
|
+
createdAt: zod_1.z.date(),
|
|
14
|
+
updatedAt: zod_1.z.date(),
|
|
15
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlideImageSlotSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.SlideImageSlotSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
prompt: zod_1.z.string(),
|
|
9
|
+
alt: zod_1.z.string(),
|
|
10
|
+
url: zod_1.z.string().nullable(),
|
|
11
|
+
placeholder: zod_1.z.string(),
|
|
12
|
+
slideId: zod_1.z.string(),
|
|
13
|
+
status: zod_1.z.nativeEnum(constants_1.SLIDE_IMAGE_SLOT_STATUS),
|
|
14
|
+
createdAt: zod_1.z.date(),
|
|
15
|
+
updatedAt: zod_1.z.date(),
|
|
16
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlideOutlineBulkUpdateSchema = exports.SlideOutlineUpdateSchema = exports.SlideOutlineSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.SlideOutlineSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string(),
|
|
8
|
+
order: zod_1.z.number(),
|
|
9
|
+
title: zod_1.z.string().max(80),
|
|
10
|
+
body: zod_1.z.string().max(500),
|
|
11
|
+
contentTypeId: zod_1.z.nativeEnum(constants_1.SLIDE_CONTENT_TYPE),
|
|
12
|
+
presentationId: zod_1.z.string(),
|
|
13
|
+
createdAt: zod_1.z.date(),
|
|
14
|
+
updatedAt: zod_1.z.date(),
|
|
15
|
+
});
|
|
16
|
+
exports.SlideOutlineUpdateSchema = exports.SlideOutlineSchema.pick({
|
|
17
|
+
title: true,
|
|
18
|
+
body: true,
|
|
19
|
+
contentTypeId: true,
|
|
20
|
+
}).partial();
|
|
21
|
+
exports.SlideOutlineBulkUpdateSchema = exports.SlideOutlineSchema.pick({
|
|
22
|
+
order: true,
|
|
23
|
+
title: true,
|
|
24
|
+
body: true,
|
|
25
|
+
contentTypeId: true,
|
|
26
|
+
presentationId: true,
|
|
27
|
+
})
|
|
28
|
+
.extend({
|
|
29
|
+
uuid: zod_1.z.string().uuid().optional(),
|
|
30
|
+
})
|
|
31
|
+
.array()
|
|
32
|
+
.min(1, 'Must include at least one slide outline')
|
|
33
|
+
.refine((arr) => {
|
|
34
|
+
const orders = arr.map((s) => s.order);
|
|
35
|
+
const unique = new Set(orders);
|
|
36
|
+
if (unique.size !== orders.length)
|
|
37
|
+
return false;
|
|
38
|
+
const sorted = [...orders].sort((a, b) => a - b);
|
|
39
|
+
return sorted.every((val, idx) => val === idx);
|
|
40
|
+
}, {
|
|
41
|
+
message: 'Slide orders must be unique and sequential starting at 0',
|
|
42
|
+
path: ['order'],
|
|
43
|
+
})
|
|
44
|
+
.refine((arr) => {
|
|
45
|
+
const [firstId, ...rest] = arr.map((s) => s.presentationId);
|
|
46
|
+
return rest.every((id) => id === firstId);
|
|
47
|
+
}, {
|
|
48
|
+
message: 'All slide outlines must belong to the same presentation',
|
|
49
|
+
path: ['presentationId'],
|
|
50
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlideBulkUpdateSchema = exports.SlideUpdateSchema = exports.SlideSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const slide_content_schema_1 = require("./slide-content.schema");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const slide_icon_slot_schema_1 = require("./slide-icon-slot.schema");
|
|
8
|
+
const slide_image_slot_schema_1 = require("./slide-image-slot.schema");
|
|
9
|
+
const slide_content_edit_schema_1 = require("./slide-content-edit.schema");
|
|
10
|
+
exports.SlideSchema = zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z.string().uuid(),
|
|
12
|
+
order: zod_1.z.number(),
|
|
13
|
+
contentTypeId: zod_1.z.nativeEnum(constants_1.SLIDE_CONTENT_TYPE),
|
|
14
|
+
layoutId: zod_1.z.nativeEnum(constants_1.SLIDE_LAYOUT),
|
|
15
|
+
content: slide_content_schema_1.SlideContentSchema,
|
|
16
|
+
presentationId: zod_1.z.string(),
|
|
17
|
+
iconSlots: zod_1.z.array(slide_icon_slot_schema_1.SlideIconSlotSchema),
|
|
18
|
+
imageSlots: zod_1.z.array(slide_image_slot_schema_1.SlideImageSlotSchema),
|
|
19
|
+
createdAt: zod_1.z.date(),
|
|
20
|
+
updatedAt: zod_1.z.date(),
|
|
21
|
+
});
|
|
22
|
+
exports.SlideUpdateSchema = exports.SlideSchema.pick({
|
|
23
|
+
layoutId: true,
|
|
24
|
+
})
|
|
25
|
+
.extend({
|
|
26
|
+
content: slide_content_edit_schema_1.SlideContentUserEditSchema,
|
|
27
|
+
})
|
|
28
|
+
.partial();
|
|
29
|
+
exports.SlideBulkUpdateSchema = exports.SlideSchema.pick({
|
|
30
|
+
order: true,
|
|
31
|
+
contentTypeId: true,
|
|
32
|
+
layoutId: true,
|
|
33
|
+
presentationId: true,
|
|
34
|
+
})
|
|
35
|
+
.extend({
|
|
36
|
+
uuid: zod_1.z.string().uuid().optional(),
|
|
37
|
+
content: slide_content_edit_schema_1.SlideContentUserEditSchema,
|
|
38
|
+
})
|
|
39
|
+
.array()
|
|
40
|
+
.min(1, 'Must include at least one slide')
|
|
41
|
+
.refine((arr) => {
|
|
42
|
+
const orders = arr.map((s) => s.order);
|
|
43
|
+
const unique = new Set(orders);
|
|
44
|
+
if (unique.size !== orders.length)
|
|
45
|
+
return false;
|
|
46
|
+
const sorted = [...orders].sort((a, b) => a - b);
|
|
47
|
+
return sorted.every((val, idx) => val === idx);
|
|
48
|
+
}, {
|
|
49
|
+
message: 'Slide orders must be unique and sequential starting at 0',
|
|
50
|
+
path: ['order'],
|
|
51
|
+
})
|
|
52
|
+
.refine((arr) => {
|
|
53
|
+
const [firstId, ...rest] = arr.map((s) => s.presentationId);
|
|
54
|
+
return rest.every((id) => id === firstId);
|
|
55
|
+
}, {
|
|
56
|
+
message: 'All slides must belong to the same presentation',
|
|
57
|
+
path: ['presentationId'],
|
|
58
|
+
});
|
package/commands/index.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SLIDE_CONTENT_TYPE } from '../../constants';
|
|
3
|
+
import { SlideSchema } from '../../models';
|
|
4
|
+
|
|
5
|
+
export namespace BuildBlankSlideCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
slideContentType: z.nativeEnum(SLIDE_CONTENT_TYPE),
|
|
8
|
+
layoutId: z.string(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = z.object({
|
|
14
|
+
data: SlideSchema,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PresentationSchema } from '../../models/presentation';
|
|
3
|
+
|
|
4
|
+
export namespace CreatePresentationCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
prompt: z.string().min(1).max(10000),
|
|
7
|
+
slideCount: z.number().min(1).max(20),
|
|
8
|
+
templateId: z.string().uuid(),
|
|
9
|
+
languageId: z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = z.object({
|
|
15
|
+
data: PresentationSchema,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace DeleteAllUserPresentationsCommand {
|
|
4
|
+
export const RequestSchema = z.void();
|
|
5
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
6
|
+
|
|
7
|
+
export const ResponseSchema = z.void();
|
|
8
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace DeletePresentationCommand {
|
|
4
|
+
export const RequestParamsSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export type Request = z.infer<typeof RequestParamsSchema>;
|
|
9
|
+
|
|
10
|
+
export const ResponseSchema = z.void();
|
|
11
|
+
|
|
12
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace DeleteSlideOutlineCommand {
|
|
4
|
+
export const RequestParamsSchema = z.object({
|
|
5
|
+
presentationId: z.string().uuid(),
|
|
6
|
+
slideOutlineId: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.void();
|
|
10
|
+
|
|
11
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PPTXExportPayloadSchema } from '../../models/presentation';
|
|
3
|
+
|
|
4
|
+
export namespace ExportPresentationAsPptxCommand {
|
|
5
|
+
export const RequestSchema = PPTXExportPayloadSchema;
|
|
6
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
7
|
+
|
|
8
|
+
export const RequestParamsSchema = z.object({
|
|
9
|
+
uuid: z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = z.object({
|
|
14
|
+
data: z.object({
|
|
15
|
+
url: z.string(),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PresentationWithSlidesSchema } from '../../models/presentation';
|
|
3
|
+
|
|
4
|
+
export namespace FindPresentationByUuidCommand {
|
|
5
|
+
export const RequestParamsSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: PresentationWithSlidesSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SlideOutlineSchema } from '../../models/presentation';
|
|
3
|
+
|
|
4
|
+
export namespace FindPresentationOutlineCommand {
|
|
5
|
+
export const RequestParamsSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: z.array(SlideOutlineSchema),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PresentationSchema } from '../../models/presentation';
|
|
3
|
+
|
|
4
|
+
export namespace FindPresentationsCommand {
|
|
5
|
+
export const RequestQuerySchema = z.object({
|
|
6
|
+
limit: z.coerce.number().min(1).optional(),
|
|
7
|
+
offset: z.coerce.number().min(0).default(0).optional(),
|
|
8
|
+
title: z.string().optional(),
|
|
9
|
+
});
|
|
10
|
+
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
11
|
+
|
|
12
|
+
export const ResponseSchema = z.object({
|
|
13
|
+
data: z.array(PresentationSchema),
|
|
14
|
+
totalPages: z.number(),
|
|
15
|
+
page: z.number(),
|
|
16
|
+
});
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|