@purpleschool/gptbot-tools 0.0.26 → 0.0.28
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/errors/errors.js +191 -0
- package/build/index.js +5 -0
- package/build/language/index.js +17 -0
- package/build/language/models/index.js +17 -0
- package/build/language/models/language.schema.js +11 -0
- package/build/presentation/commands/create-presentation.command.js +18 -0
- package/build/presentation/commands/delete-all-user-presentations.command.js +13 -0
- package/build/presentation/commands/delete-presentation.command.js +14 -0
- package/build/presentation/commands/delete-slide-outline.command.js +15 -0
- package/build/presentation/commands/export-as-pptx.command.js +18 -0
- package/build/presentation/commands/generate-presentation-outline.command.js +18 -0
- package/build/presentation/commands/generate-slides.command.js +15 -0
- package/build/presentation/commands/index.js +27 -0
- package/build/presentation/commands/reposition-slide-outline.command.js +16 -0
- package/build/presentation/commands/update-presentation-outline.command.js +16 -0
- package/build/presentation/commands/update-presentation.command.js +16 -0
- package/build/presentation/commands/update-slide-outline.command.js +17 -0
- package/build/presentation/constants/index.js +17 -0
- package/build/presentation/constants/slide-layout-map.constant.js +16 -0
- package/build/presentation/enums/index.js +22 -0
- package/build/presentation/enums/presentation-stage.enum.js +14 -0
- package/build/presentation/enums/slide-content-type.enum.js +15 -0
- package/build/presentation/enums/slide-icon-slot-status.enum.js +10 -0
- package/build/presentation/enums/slide-image-job-status.enum.js +10 -0
- package/build/presentation/enums/slide-image-slot-status.enum.js +10 -0
- package/build/presentation/enums/slide-layout.enum.js +8 -0
- package/build/presentation/index.js +22 -0
- package/build/presentation/models/index.js +25 -0
- package/build/presentation/models/pptx-export-payload.js +183 -0
- package/build/presentation/models/presentation-config.schema.js +17 -0
- package/build/presentation/models/presentation-template.schema.js +13 -0
- package/build/presentation/models/presentation.schema.js +30 -0
- package/build/presentation/models/slide-content-type.schema.js +14 -0
- package/build/presentation/models/slide-content.schema.js +178 -0
- package/build/presentation/models/slide-icon-slot.schema.js +15 -0
- package/build/presentation/models/slide-image-slot.schema.js +16 -0
- package/build/presentation/models/slide-outline.schema.js +50 -0
- package/build/presentation/models/slide.schema.js +20 -0
- package/build/presentation/queries/find-presentation-by-uuid.query.js +13 -0
- package/build/presentation/queries/find-presentation-outline.query.js +15 -0
- package/build/presentation/queries/find-presentations.query.js +21 -0
- package/build/presentation/queries/get-presentation-config.query.js +9 -0
- package/build/presentation/queries/index.js +20 -0
- package/build/presentation/routes/index.js +17 -0
- package/build/presentation/routes/presentation.routes.js +22 -0
- package/build/video/models/video-job.schema.js +1 -0
- package/common/errors/errors.ts +191 -0
- package/index.ts +5 -0
- package/language/index.ts +1 -0
- package/language/models/index.ts +1 -0
- package/language/models/language.schema.ts +9 -0
- package/package.json +1 -1
- package/presentation/commands/create-presentation.command.ts +18 -0
- package/presentation/commands/delete-all-user-presentations.command.ts +13 -0
- package/presentation/commands/delete-presentation.command.ts +14 -0
- package/presentation/commands/delete-slide-outline.command.ts +15 -0
- package/presentation/commands/export-as-pptx.command.ts +20 -0
- package/presentation/commands/generate-presentation-outline.command.ts +18 -0
- package/presentation/commands/generate-slides.command.ts +15 -0
- package/presentation/commands/index.ts +11 -0
- package/presentation/commands/reposition-slide-outline.command.ts +16 -0
- package/presentation/commands/update-presentation-outline.command.ts +16 -0
- package/presentation/commands/update-presentation.command.ts +16 -0
- package/presentation/commands/update-slide-outline.command.ts +17 -0
- package/presentation/constants/index.ts +1 -0
- package/presentation/constants/slide-layout-map.constant.ts +14 -0
- package/presentation/enums/index.ts +6 -0
- package/presentation/enums/presentation-stage.enum.ts +13 -0
- package/presentation/enums/slide-content-type.enum.ts +11 -0
- package/presentation/enums/slide-icon-slot-status.enum.ts +6 -0
- package/presentation/enums/slide-image-job-status.enum.ts +6 -0
- package/presentation/enums/slide-image-slot-status.enum.ts +6 -0
- package/presentation/enums/slide-layout.enum.ts +4 -0
- package/presentation/index.ts +6 -0
- package/presentation/models/index.ts +9 -0
- package/presentation/models/pptx-export-payload.ts +212 -0
- package/presentation/models/presentation-config.schema.ts +16 -0
- package/presentation/models/presentation-template.schema.ts +12 -0
- package/presentation/models/presentation.schema.ts +33 -0
- package/presentation/models/slide-content-type.schema.ts +13 -0
- package/presentation/models/slide-content.schema.ts +221 -0
- package/presentation/models/slide-icon-slot.schema.ts +13 -0
- package/presentation/models/slide-image-slot.schema.ts +14 -0
- package/presentation/models/slide-outline.schema.ts +58 -0
- package/presentation/models/slide.schema.ts +19 -0
- package/presentation/queries/find-presentation-by-uuid.query.ts +13 -0
- package/presentation/queries/find-presentation-outline.query.ts +15 -0
- package/presentation/queries/find-presentations.query.ts +24 -0
- package/presentation/queries/get-presentation-config.query.ts +8 -0
- package/presentation/queries/index.ts +4 -0
- package/presentation/routes/index.ts +1 -0
- package/presentation/routes/presentation.routes.ts +20 -0
- package/video/models/video-job.schema.ts +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./commands"), exports);
|
|
18
|
+
__exportStar(require("./constants"), exports);
|
|
19
|
+
__exportStar(require("./models"), exports);
|
|
20
|
+
__exportStar(require("./enums"), exports);
|
|
21
|
+
__exportStar(require("./routes"), exports);
|
|
22
|
+
__exportStar(require("./queries"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./pptx-export-payload"), exports);
|
|
18
|
+
__exportStar(require("./presentation-config.schema"), exports);
|
|
19
|
+
__exportStar(require("./presentation-template.schema"), exports);
|
|
20
|
+
__exportStar(require("./presentation.schema"), exports);
|
|
21
|
+
__exportStar(require("./slide-content-type.schema"), exports);
|
|
22
|
+
__exportStar(require("./slide-outline.schema"), exports);
|
|
23
|
+
__exportStar(require("./slide.schema"), exports);
|
|
24
|
+
__exportStar(require("./slide-image-slot.schema"), exports);
|
|
25
|
+
__exportStar(require("./slide-content.schema"), exports);
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PPTXExportPayloadSchema = exports.PPTXSlideSchema = exports.SlideBackground = exports.PPTXShapeSchema = exports.PPTXTableShapeSchema = exports.PPTXTableRowSchema = exports.PPTXTableCellSchema = exports.PPTXCustomShapeSchema = exports.PPTXPictureBoxSchema = exports.PPTXTextBoxSchema = exports.PPTXParagraphSchema = exports.PPTXFontSchema = exports.PPTXPositionSchema = exports.PPTXMarginSchema = exports.PPTXFillSchema = exports.PPTXShadowSchema = exports.PPTX_CUSTOM_SHAPE_TYPE = exports.PPTX_SHADOW_TYPE = exports.PPTX_FILL_TYPE = exports.PPTX_BORDER_TYPE = exports.PPTX_OBJECT_FIT = exports.PPTX_V_ALIGN = exports.PPTX_H_ALIGN = exports.PPTX_SHAPE_TYPE = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var PPTX_SHAPE_TYPE;
|
|
6
|
+
(function (PPTX_SHAPE_TYPE) {
|
|
7
|
+
PPTX_SHAPE_TYPE["TEXT_BOX"] = "text_box";
|
|
8
|
+
PPTX_SHAPE_TYPE["PICTURE_BOX"] = "picture_box";
|
|
9
|
+
PPTX_SHAPE_TYPE["CUSTOM_SHAPE"] = "custom_shape";
|
|
10
|
+
PPTX_SHAPE_TYPE["TABLE"] = "table";
|
|
11
|
+
})(PPTX_SHAPE_TYPE || (exports.PPTX_SHAPE_TYPE = PPTX_SHAPE_TYPE = {}));
|
|
12
|
+
var PPTX_H_ALIGN;
|
|
13
|
+
(function (PPTX_H_ALIGN) {
|
|
14
|
+
PPTX_H_ALIGN["LEFT"] = "left";
|
|
15
|
+
PPTX_H_ALIGN["CENTER"] = "center";
|
|
16
|
+
PPTX_H_ALIGN["RIGHT"] = "right";
|
|
17
|
+
PPTX_H_ALIGN["JUSTIFY"] = "justify";
|
|
18
|
+
})(PPTX_H_ALIGN || (exports.PPTX_H_ALIGN = PPTX_H_ALIGN = {}));
|
|
19
|
+
var PPTX_V_ALIGN;
|
|
20
|
+
(function (PPTX_V_ALIGN) {
|
|
21
|
+
PPTX_V_ALIGN["TOP"] = "top";
|
|
22
|
+
PPTX_V_ALIGN["MIDDLE"] = "middle";
|
|
23
|
+
PPTX_V_ALIGN["BOTTOM"] = "bottom";
|
|
24
|
+
})(PPTX_V_ALIGN || (exports.PPTX_V_ALIGN = PPTX_V_ALIGN = {}));
|
|
25
|
+
var PPTX_OBJECT_FIT;
|
|
26
|
+
(function (PPTX_OBJECT_FIT) {
|
|
27
|
+
PPTX_OBJECT_FIT["COVER"] = "cover";
|
|
28
|
+
PPTX_OBJECT_FIT["CONTAIN"] = "contain";
|
|
29
|
+
PPTX_OBJECT_FIT["CROP"] = "crop";
|
|
30
|
+
})(PPTX_OBJECT_FIT || (exports.PPTX_OBJECT_FIT = PPTX_OBJECT_FIT = {}));
|
|
31
|
+
var PPTX_BORDER_TYPE;
|
|
32
|
+
(function (PPTX_BORDER_TYPE) {
|
|
33
|
+
PPTX_BORDER_TYPE["SOLID"] = "solid";
|
|
34
|
+
PPTX_BORDER_TYPE["NONE"] = "none";
|
|
35
|
+
PPTX_BORDER_TYPE["DASH"] = "dash";
|
|
36
|
+
})(PPTX_BORDER_TYPE || (exports.PPTX_BORDER_TYPE = PPTX_BORDER_TYPE = {}));
|
|
37
|
+
var PPTX_FILL_TYPE;
|
|
38
|
+
(function (PPTX_FILL_TYPE) {
|
|
39
|
+
PPTX_FILL_TYPE["SOLID"] = "solid";
|
|
40
|
+
PPTX_FILL_TYPE["NONE"] = "none";
|
|
41
|
+
})(PPTX_FILL_TYPE || (exports.PPTX_FILL_TYPE = PPTX_FILL_TYPE = {}));
|
|
42
|
+
var PPTX_SHADOW_TYPE;
|
|
43
|
+
(function (PPTX_SHADOW_TYPE) {
|
|
44
|
+
PPTX_SHADOW_TYPE["OUTER"] = "outer";
|
|
45
|
+
PPTX_SHADOW_TYPE["INNER"] = "inner";
|
|
46
|
+
PPTX_SHADOW_TYPE["NONE"] = "none";
|
|
47
|
+
})(PPTX_SHADOW_TYPE || (exports.PPTX_SHADOW_TYPE = PPTX_SHADOW_TYPE = {}));
|
|
48
|
+
var PPTX_CUSTOM_SHAPE_TYPE;
|
|
49
|
+
(function (PPTX_CUSTOM_SHAPE_TYPE) {
|
|
50
|
+
PPTX_CUSTOM_SHAPE_TYPE["ROUND_RECT"] = "roundRect";
|
|
51
|
+
})(PPTX_CUSTOM_SHAPE_TYPE || (exports.PPTX_CUSTOM_SHAPE_TYPE = PPTX_CUSTOM_SHAPE_TYPE = {}));
|
|
52
|
+
exports.PPTXShadowSchema = zod_1.z.object({
|
|
53
|
+
type: zod_1.z.nativeEnum(PPTX_SHADOW_TYPE),
|
|
54
|
+
opacity: zod_1.z.number().min(0).max(100).optional().describe('percents, range 0-100'),
|
|
55
|
+
color: zod_1.z.string().optional().describe('hex color'),
|
|
56
|
+
blur: zod_1.z.number().min(0).max(100).optional().describe('degrees, range 0-100'),
|
|
57
|
+
angle: zod_1.z.number().min(0).max(359).optional().describe('degrees, range 0-359'),
|
|
58
|
+
offset: zod_1.z.number().min(0).max(200).optional().describe('points, range 0-200'),
|
|
59
|
+
rotateWithShape: zod_1.z.boolean().optional().describe('whether or not to rotate shadow with shape'),
|
|
60
|
+
});
|
|
61
|
+
exports.PPTXFillSchema = zod_1.z.object({
|
|
62
|
+
color: zod_1.z.string(),
|
|
63
|
+
type: zod_1.z.nativeEnum(PPTX_FILL_TYPE),
|
|
64
|
+
transparency: zod_1.z.number().min(0).max(100).optional().describe('percents, range 0-100'),
|
|
65
|
+
alpha: zod_1.z.number().min(0).max(1).optional().describe('range 0-1'),
|
|
66
|
+
});
|
|
67
|
+
exports.PPTXMarginSchema = zod_1.z.union([
|
|
68
|
+
zod_1.z.number(),
|
|
69
|
+
zod_1.z.tuple([zod_1.z.number(), zod_1.z.number(), zod_1.z.number(), zod_1.z.number()]),
|
|
70
|
+
]);
|
|
71
|
+
// Common
|
|
72
|
+
exports.PPTXPositionSchema = zod_1.z.object({
|
|
73
|
+
height: zod_1.z.number(),
|
|
74
|
+
width: zod_1.z.number(),
|
|
75
|
+
top: zod_1.z.number(),
|
|
76
|
+
left: zod_1.z.number(),
|
|
77
|
+
});
|
|
78
|
+
exports.PPTXFontSchema = zod_1.z.object({
|
|
79
|
+
bold: zod_1.z.boolean().optional(),
|
|
80
|
+
color: zod_1.z.string(),
|
|
81
|
+
name: zod_1.z.string(),
|
|
82
|
+
size: zod_1.z.number(),
|
|
83
|
+
lineHeight: zod_1.z
|
|
84
|
+
.union([
|
|
85
|
+
zod_1.z.object({
|
|
86
|
+
percent: zod_1.z.number(),
|
|
87
|
+
}),
|
|
88
|
+
zod_1.z.object({
|
|
89
|
+
px: zod_1.z.number(),
|
|
90
|
+
}),
|
|
91
|
+
])
|
|
92
|
+
.optional(),
|
|
93
|
+
});
|
|
94
|
+
// Textual
|
|
95
|
+
exports.PPTXParagraphSchema = zod_1.z.object({
|
|
96
|
+
alignment: zod_1.z.nativeEnum(PPTX_H_ALIGN),
|
|
97
|
+
font: exports.PPTXFontSchema,
|
|
98
|
+
valign: zod_1.z.nativeEnum(PPTX_V_ALIGN).optional(),
|
|
99
|
+
margin: exports.PPTXMarginSchema.optional(),
|
|
100
|
+
rotate: zod_1.z.number().optional(),
|
|
101
|
+
text: zod_1.z.string(),
|
|
102
|
+
});
|
|
103
|
+
exports.PPTXTextBoxSchema = zod_1.z.object({
|
|
104
|
+
type: zod_1.z.literal(PPTX_SHAPE_TYPE.TEXT_BOX),
|
|
105
|
+
position: exports.PPTXPositionSchema,
|
|
106
|
+
paragraphs: zod_1.z.array(exports.PPTXParagraphSchema),
|
|
107
|
+
});
|
|
108
|
+
// Picture
|
|
109
|
+
exports.PPTXPictureBoxSchema = zod_1.z.object({
|
|
110
|
+
type: zod_1.z.literal(PPTX_SHAPE_TYPE.PICTURE_BOX),
|
|
111
|
+
position: exports.PPTXPositionSchema,
|
|
112
|
+
borderRadius: zod_1.z.array(zod_1.z.number()).optional(),
|
|
113
|
+
objectFit: zod_1.z.nativeEnum(PPTX_OBJECT_FIT),
|
|
114
|
+
data: zod_1.z.union([
|
|
115
|
+
zod_1.z.object({
|
|
116
|
+
base64: zod_1.z
|
|
117
|
+
.string()
|
|
118
|
+
.describe('Base64 encoded image in "image/{mimeType};base64,{bas64}" format'),
|
|
119
|
+
}),
|
|
120
|
+
zod_1.z.object({
|
|
121
|
+
path: zod_1.z.string().describe('URL to image'),
|
|
122
|
+
}),
|
|
123
|
+
]),
|
|
124
|
+
});
|
|
125
|
+
// CustomShape
|
|
126
|
+
exports.PPTXCustomShapeSchema = zod_1.z.object({
|
|
127
|
+
type: zod_1.z.literal(PPTX_SHAPE_TYPE.CUSTOM_SHAPE),
|
|
128
|
+
customShapeType: zod_1.z.nativeEnum(PPTX_CUSTOM_SHAPE_TYPE).optional(),
|
|
129
|
+
position: exports.PPTXPositionSchema,
|
|
130
|
+
borderRadius: zod_1.z.number(),
|
|
131
|
+
fill: exports.PPTXFillSchema.optional(),
|
|
132
|
+
shadow: exports.PPTXShadowSchema.optional(),
|
|
133
|
+
});
|
|
134
|
+
// Table
|
|
135
|
+
exports.PPTXTableCellSchema = zod_1.z.object({
|
|
136
|
+
text: zod_1.z.string().optional(),
|
|
137
|
+
font: exports.PPTXFontSchema.optional(),
|
|
138
|
+
fill: zod_1.z
|
|
139
|
+
.object({
|
|
140
|
+
color: zod_1.z.string(),
|
|
141
|
+
type: zod_1.z.nativeEnum(PPTX_FILL_TYPE),
|
|
142
|
+
transparency: zod_1.z.number().min(0).max(100).optional().describe('percents, range 0-100'),
|
|
143
|
+
})
|
|
144
|
+
.optional(),
|
|
145
|
+
align: zod_1.z.nativeEnum(PPTX_H_ALIGN).optional(),
|
|
146
|
+
valign: zod_1.z.nativeEnum(PPTX_V_ALIGN).optional(),
|
|
147
|
+
colspan: zod_1.z.number().int().optional(),
|
|
148
|
+
rowspan: zod_1.z.number().int().optional(),
|
|
149
|
+
margin: exports.PPTXMarginSchema.optional(),
|
|
150
|
+
});
|
|
151
|
+
exports.PPTXTableRowSchema = zod_1.z.array(exports.PPTXTableCellSchema);
|
|
152
|
+
exports.PPTXTableShapeSchema = zod_1.z.object({
|
|
153
|
+
type: zod_1.z.literal(PPTX_SHAPE_TYPE.TABLE),
|
|
154
|
+
position: exports.PPTXPositionSchema,
|
|
155
|
+
rows: zod_1.z.array(exports.PPTXTableRowSchema),
|
|
156
|
+
columnWidths: zod_1.z.array(zod_1.z.number()).optional(),
|
|
157
|
+
headerRows: zod_1.z.number().int().min(0).optional(),
|
|
158
|
+
border: zod_1.z.object({
|
|
159
|
+
type: zod_1.z.nativeEnum(PPTX_BORDER_TYPE),
|
|
160
|
+
color: zod_1.z.string(),
|
|
161
|
+
px: zod_1.z.number(),
|
|
162
|
+
}),
|
|
163
|
+
});
|
|
164
|
+
// Overview
|
|
165
|
+
exports.PPTXShapeSchema = zod_1.z.discriminatedUnion('type', [
|
|
166
|
+
exports.PPTXTextBoxSchema,
|
|
167
|
+
exports.PPTXPictureBoxSchema,
|
|
168
|
+
exports.PPTXCustomShapeSchema,
|
|
169
|
+
exports.PPTXTableShapeSchema,
|
|
170
|
+
]);
|
|
171
|
+
exports.SlideBackground = zod_1.z.union([
|
|
172
|
+
exports.PPTXFillSchema,
|
|
173
|
+
zod_1.z.object({
|
|
174
|
+
path: zod_1.z.string(),
|
|
175
|
+
}),
|
|
176
|
+
]);
|
|
177
|
+
exports.PPTXSlideSchema = zod_1.z.object({
|
|
178
|
+
background: exports.SlideBackground.optional(),
|
|
179
|
+
shapes: zod_1.z.array(exports.PPTXShapeSchema),
|
|
180
|
+
});
|
|
181
|
+
exports.PPTXExportPayloadSchema = zod_1.z.object({
|
|
182
|
+
slides: zod_1.z.array(exports.PPTXSlideSchema),
|
|
183
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresentationConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const slide_content_type_schema_1 = require("./slide-content-type.schema");
|
|
6
|
+
const language_1 = require("../../language");
|
|
7
|
+
const presentation_template_schema_1 = require("./presentation-template.schema");
|
|
8
|
+
exports.PresentationConfigSchema = zod_1.z.object({
|
|
9
|
+
slideContentTypes: zod_1.z.array(slide_content_type_schema_1.SlideContentTypeSchema),
|
|
10
|
+
languages: zod_1.z.array(language_1.LanguageSchema),
|
|
11
|
+
templates: zod_1.z.array(presentation_template_schema_1.PresentationTemplateSchema),
|
|
12
|
+
slideGenerationPrice: zod_1.z.number(),
|
|
13
|
+
maxSlides: zod_1.z.number(),
|
|
14
|
+
minSlides: zod_1.z.number(),
|
|
15
|
+
maxSlideOutlineLength: zod_1.z.number(),
|
|
16
|
+
maxPromptLength: zod_1.z.number(),
|
|
17
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresentationTemplateSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PresentationTemplateSchema = zod_1.z.object({
|
|
6
|
+
uuid: zod_1.z.string().uuid(),
|
|
7
|
+
title: zod_1.z.string(),
|
|
8
|
+
image: zod_1.z.string(),
|
|
9
|
+
order: zod_1.z.number(),
|
|
10
|
+
imagePlaceholder: zod_1.z.string(),
|
|
11
|
+
createdAt: zod_1.z.date(),
|
|
12
|
+
updatedAt: zod_1.z.date(),
|
|
13
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresentationUpdateSchema = exports.PresentationWithSlidesSchema = exports.PresentationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
const slide_outline_schema_1 = require("./slide-outline.schema");
|
|
7
|
+
const slide_schema_1 = require("./slide.schema");
|
|
8
|
+
exports.PresentationSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
prompt: zod_1.z.string(),
|
|
11
|
+
stage: zod_1.z.nativeEnum(enums_1.PRESENTATION_STAGE),
|
|
12
|
+
title: zod_1.z.string(),
|
|
13
|
+
thumbnail: zod_1.z.string(),
|
|
14
|
+
languageId: zod_1.z.string(),
|
|
15
|
+
templateId: zod_1.z.string(),
|
|
16
|
+
downloadUrl: zod_1.z.string().nullable(),
|
|
17
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
18
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
19
|
+
slideCount: zod_1.z.number(),
|
|
20
|
+
isDeleted: zod_1.z.boolean(),
|
|
21
|
+
createdAt: zod_1.z.date(),
|
|
22
|
+
updatedAt: zod_1.z.date(),
|
|
23
|
+
});
|
|
24
|
+
exports.PresentationWithSlidesSchema = exports.PresentationSchema.extend({
|
|
25
|
+
outline: zod_1.z.array(slide_outline_schema_1.SlideOutlineSchema),
|
|
26
|
+
slides: zod_1.z.array(slide_schema_1.SlideSchema),
|
|
27
|
+
});
|
|
28
|
+
exports.PresentationUpdateSchema = exports.PresentationSchema.pick({
|
|
29
|
+
title: true,
|
|
30
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlideContentTypeSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
exports.SlideContentTypeSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.nativeEnum(enums_1.SLIDE_CONTENT_TYPE),
|
|
8
|
+
title: zod_1.z.string(),
|
|
9
|
+
layouts: zod_1.z.array(zod_1.z.nativeEnum(enums_1.SLIDE_LAYOUT)),
|
|
10
|
+
order: zod_1.z.number(),
|
|
11
|
+
icon: zod_1.z.string(),
|
|
12
|
+
createdAt: zod_1.z.date(),
|
|
13
|
+
updatedAt: zod_1.z.date(),
|
|
14
|
+
});
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlideContentSchema = 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 enums_1 = require("../enums");
|
|
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.string().describe('Image prompt for slide'),
|
|
16
|
+
});
|
|
17
|
+
exports.IconSlotSchema = zod_1.z.object({
|
|
18
|
+
uuid: zod_1.z
|
|
19
|
+
.string()
|
|
20
|
+
.uuid()
|
|
21
|
+
.describe('Generate a valid uuid for icon slot, that will be used for future lookups'),
|
|
22
|
+
prompt: zod_1.z
|
|
23
|
+
.string()
|
|
24
|
+
.describe('Icons are stored locally. Provide a search query for a fitting icon. MUST BE IN ENGLISH'),
|
|
25
|
+
});
|
|
26
|
+
exports.CoverSlideDataSchema = zod_1.z.object({
|
|
27
|
+
contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.COVER),
|
|
28
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
29
|
+
author: zod_1.z.object({
|
|
30
|
+
label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
|
|
31
|
+
value: zod_1.z
|
|
32
|
+
.string()
|
|
33
|
+
.describe('Literal "Author of the presentation" in presentation\'s language'),
|
|
34
|
+
}),
|
|
35
|
+
date: zod_1.z.object({
|
|
36
|
+
label: zod_1.z.string().describe('Literal "Date" in presentation\'s language'),
|
|
37
|
+
value: zod_1.z
|
|
38
|
+
.string()
|
|
39
|
+
.describe('Date of the presentation in the "dd month yyyy" format in presentation\'s locale'),
|
|
40
|
+
}),
|
|
41
|
+
email: zod_1.z.object({
|
|
42
|
+
label: zod_1.z.string().describe('Just default word "Email"'),
|
|
43
|
+
value: zod_1.z.string().describe('Just default "email@example.com"'),
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
46
|
+
exports.ThankYouSlideDataSchema = zod_1.z.object({
|
|
47
|
+
contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.THANK_YOU),
|
|
48
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
49
|
+
author: zod_1.z.object({
|
|
50
|
+
label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
|
|
51
|
+
value: zod_1.z
|
|
52
|
+
.string()
|
|
53
|
+
.describe('Literal "Author of the presentation" in presentation\'s language'),
|
|
54
|
+
}),
|
|
55
|
+
date: zod_1.z.object({
|
|
56
|
+
label: zod_1.z.string().describe('Literal "Date" in presentation\'s language'),
|
|
57
|
+
value: zod_1.z
|
|
58
|
+
.string()
|
|
59
|
+
.describe('Date of the presentation in the "dd month yyyy" format in presentation\'s locale'),
|
|
60
|
+
}),
|
|
61
|
+
email: zod_1.z.object({
|
|
62
|
+
label: zod_1.z.string().describe('Just default word "Email"'),
|
|
63
|
+
value: zod_1.z.string().describe('Just default "email@example.com"'),
|
|
64
|
+
}),
|
|
65
|
+
});
|
|
66
|
+
exports.StructuredListSlideDataSchema = zod_1.z.object({
|
|
67
|
+
contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.STRUCTURED_LIST),
|
|
68
|
+
title: zod_1.z.string().describe('Slide title, 2–6 words'),
|
|
69
|
+
description: zod_1.z.string().describe('One short framing sentence'),
|
|
70
|
+
list: zod_1.z
|
|
71
|
+
.array(zod_1.z.object({
|
|
72
|
+
title: zod_1.z.string().describe('2–4 words, concrete'),
|
|
73
|
+
description: zod_1.z
|
|
74
|
+
.string()
|
|
75
|
+
.describe('One clear short framing sentence, explains the point, 8–14 words'),
|
|
76
|
+
}))
|
|
77
|
+
.length(4),
|
|
78
|
+
});
|
|
79
|
+
exports.TextSlideDataSchema = zod_1.z.object({
|
|
80
|
+
contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.TEXT),
|
|
81
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
82
|
+
description: zod_1.z
|
|
83
|
+
.string()
|
|
84
|
+
.describe('Fairly long textual description of the point presented in the title. A couple of paragraphs.')
|
|
85
|
+
.min(300)
|
|
86
|
+
.max(1000),
|
|
87
|
+
});
|
|
88
|
+
exports.ContentsSlideDataSchema = zod_1.z.object({
|
|
89
|
+
contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.CONTENTS),
|
|
90
|
+
title: zod_1.z
|
|
91
|
+
.string()
|
|
92
|
+
.describe('This slide represents table of contents for the presentation and must be named "Contents" in the presentation language')
|
|
93
|
+
.min(10)
|
|
94
|
+
.max(200),
|
|
95
|
+
items: zod_1.z
|
|
96
|
+
.array(zod_1.z.string().min(1))
|
|
97
|
+
.min(1)
|
|
98
|
+
.describe('List of slide titles. Must be relevant and generated after all the slides are generated'),
|
|
99
|
+
});
|
|
100
|
+
exports.ImageSlideDataSchema = zod_1.z.object({
|
|
101
|
+
contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.IMAGE),
|
|
102
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
103
|
+
description: zod_1.z
|
|
104
|
+
.string()
|
|
105
|
+
.describe("Either a short description or a slightly long description of the slide's title depending on the context")
|
|
106
|
+
.min(10)
|
|
107
|
+
.max(500),
|
|
108
|
+
imageSlot: exports.ImageSlotSchema,
|
|
109
|
+
});
|
|
110
|
+
exports.SectionBreakSlideDataSchema = zod_1.z.object({
|
|
111
|
+
contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.SECTION_BREAK),
|
|
112
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
113
|
+
description: zod_1.z.string().describe('Description of the slide in about 6 words').min(10).max(200),
|
|
114
|
+
});
|
|
115
|
+
exports.TableSlideDataSchema = zod_1.z.object({
|
|
116
|
+
contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.TABLE),
|
|
117
|
+
title: zod_1.z
|
|
118
|
+
.string()
|
|
119
|
+
.describe('Slide title and table title at the same time in a couple of words')
|
|
120
|
+
.min(10)
|
|
121
|
+
.max(200),
|
|
122
|
+
description: zod_1.z.string().describe('Description of the table represents').min(10).max(200),
|
|
123
|
+
table: zod_1.z.object({
|
|
124
|
+
columnHeaders: zod_1.z
|
|
125
|
+
.array(zod_1.z.string().min(1).max(50))
|
|
126
|
+
.min(1)
|
|
127
|
+
.max(10)
|
|
128
|
+
.describe('Array of column header labels'),
|
|
129
|
+
rows: zod_1.z
|
|
130
|
+
.array(zod_1.z.array(zod_1.z.string().min(1).max(150)))
|
|
131
|
+
.min(2)
|
|
132
|
+
.max(10)
|
|
133
|
+
.describe('Table rows; each row must have exactly the same number of cells as columnHeaders'),
|
|
134
|
+
hasRowHeaders: zod_1.z.boolean().describe('If table needs special row headers, set this to true'),
|
|
135
|
+
hasSummaryRow: zod_1.z.boolean().describe('If table needs a summary row, set this to true'),
|
|
136
|
+
}),
|
|
137
|
+
});
|
|
138
|
+
// Charts
|
|
139
|
+
exports.BarChartSlideDataSchema = zod_1.z.object({
|
|
140
|
+
type: zod_1.z.literal(SLIDE_CHART_TYPE.BAR),
|
|
141
|
+
categories: zod_1.z
|
|
142
|
+
.array(zod_1.z.string().min(1).max(12))
|
|
143
|
+
.min(1)
|
|
144
|
+
.max(12)
|
|
145
|
+
.describe('Category labels (e.g., months, products, regions)'),
|
|
146
|
+
series: zod_1.z
|
|
147
|
+
.array(zod_1.z.object({
|
|
148
|
+
name: zod_1.z.string().min(1).max(12).describe('Series name for legend'),
|
|
149
|
+
data: zod_1.z.array(zod_1.z.number()).describe('Values corresponding to categories'),
|
|
150
|
+
type: zod_1.z
|
|
151
|
+
.number()
|
|
152
|
+
.min(0)
|
|
153
|
+
.max(11)
|
|
154
|
+
.describe('Series type. Used to discriminate colors when applying theme'),
|
|
155
|
+
}))
|
|
156
|
+
.min(1)
|
|
157
|
+
.max(12)
|
|
158
|
+
.describe('Data series for the chart'),
|
|
159
|
+
yAxisLabel: zod_1.z.string().max(40).optional().describe('Y-axis label'),
|
|
160
|
+
unit: zod_1.z.string().max(10).optional().describe('Unit symbol (%, $, etc.)'),
|
|
161
|
+
});
|
|
162
|
+
exports.ChartSlideDataSchema = zod_1.z.object({
|
|
163
|
+
contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.CHART),
|
|
164
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
165
|
+
description: zod_1.z.string().describe("Information on slide's topic").min(10).max(400),
|
|
166
|
+
chart: zod_1.z.discriminatedUnion('type', [exports.BarChartSlideDataSchema]),
|
|
167
|
+
});
|
|
168
|
+
exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
169
|
+
exports.CoverSlideDataSchema,
|
|
170
|
+
exports.StructuredListSlideDataSchema,
|
|
171
|
+
exports.TextSlideDataSchema,
|
|
172
|
+
exports.ContentsSlideDataSchema,
|
|
173
|
+
exports.SectionBreakSlideDataSchema,
|
|
174
|
+
exports.ImageSlideDataSchema,
|
|
175
|
+
exports.ThankYouSlideDataSchema,
|
|
176
|
+
exports.TableSlideDataSchema,
|
|
177
|
+
exports.ChartSlideDataSchema,
|
|
178
|
+
]);
|
|
@@ -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 enums_1 = require("../enums");
|
|
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(enums_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 enums_1 = require("../enums");
|
|
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(enums_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 enums_1 = require("../enums");
|
|
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(enums_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,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlideSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const slide_content_schema_1 = require("./slide-content.schema");
|
|
6
|
+
const enums_1 = require("../enums");
|
|
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
|
+
exports.SlideSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
order: zod_1.z.number(),
|
|
12
|
+
contentTypeId: zod_1.z.nativeEnum(enums_1.SLIDE_CONTENT_TYPE),
|
|
13
|
+
layoutId: zod_1.z.nativeEnum(enums_1.SLIDE_LAYOUT),
|
|
14
|
+
content: slide_content_schema_1.SlideContentSchema,
|
|
15
|
+
presentationId: zod_1.z.string(),
|
|
16
|
+
iconSlots: zod_1.z.array(slide_icon_slot_schema_1.SlideIconSlotSchema),
|
|
17
|
+
imageSlots: zod_1.z.array(slide_image_slot_schema_1.SlideImageSlotSchema),
|
|
18
|
+
createdAt: zod_1.z.date(),
|
|
19
|
+
updatedAt: zod_1.z.date(),
|
|
20
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindPresentationByUuidQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var FindPresentationByUuidQuery;
|
|
8
|
+
(function (FindPresentationByUuidQuery) {
|
|
9
|
+
FindPresentationByUuidQuery.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
});
|
|
12
|
+
FindPresentationByUuidQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationWithSlidesSchema);
|
|
13
|
+
})(FindPresentationByUuidQuery || (exports.FindPresentationByUuidQuery = FindPresentationByUuidQuery = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindPresentationOutlineQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var FindPresentationOutlineQuery;
|
|
8
|
+
(function (FindPresentationOutlineQuery) {
|
|
9
|
+
FindPresentationOutlineQuery.RequestSchema = zod_1.z.object({
|
|
10
|
+
presentationId: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
});
|
|
14
|
+
FindPresentationOutlineQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.array(models_1.SlideOutlineSchema));
|
|
15
|
+
})(FindPresentationOutlineQuery || (exports.FindPresentationOutlineQuery = FindPresentationOutlineQuery = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindPresentationsQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var FindPresentationsQuery;
|
|
8
|
+
(function (FindPresentationsQuery) {
|
|
9
|
+
FindPresentationsQuery.RequestSchema = zod_1.z.object({
|
|
10
|
+
userId: zod_1.z.string().uuid().optional(),
|
|
11
|
+
unregisteredUserId: zod_1.z.string().uuid().optional(),
|
|
12
|
+
title: zod_1.z.string().optional(),
|
|
13
|
+
limit: zod_1.z.coerce.number().min(1).optional(),
|
|
14
|
+
offset: zod_1.z.coerce.number().min(0).optional(),
|
|
15
|
+
});
|
|
16
|
+
FindPresentationsQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
|
|
17
|
+
data: zod_1.z.array(models_1.PresentationSchema),
|
|
18
|
+
page: zod_1.z.number(),
|
|
19
|
+
totalPages: zod_1.z.number(),
|
|
20
|
+
}));
|
|
21
|
+
})(FindPresentationsQuery || (exports.FindPresentationsQuery = FindPresentationsQuery = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPresentationConfigQuery = void 0;
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
|
+
const models_1 = require("../models");
|
|
6
|
+
var GetPresentationConfigQuery;
|
|
7
|
+
(function (GetPresentationConfigQuery) {
|
|
8
|
+
GetPresentationConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationConfigSchema);
|
|
9
|
+
})(GetPresentationConfigQuery || (exports.GetPresentationConfigQuery = GetPresentationConfigQuery = {}));
|