@purpleschool/gptbot 0.7.12 → 0.7.14
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/controllers/http/index.ts +1 -0
- package/api/controllers/http/presentation.ts +26 -0
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/controllers/http/presentation.js +25 -0
- package/build/commands/file/calculate-file-cost.command.js +1 -1
- package/build/commands/file/upload.command.js +1 -1
- package/build/commands/tools/index.js +1 -0
- package/build/commands/tools/presentation/create-presentation.command.js +17 -0
- package/build/commands/tools/presentation/delete-all-user-presentations.command.js +8 -0
- package/build/commands/tools/presentation/delete-presentation.command.js +11 -0
- package/build/commands/tools/presentation/delete-slide-outline.command.js +12 -0
- package/build/commands/tools/presentation/export-presentation-as-pptx.command.js +17 -0
- package/build/commands/tools/presentation/find-presentation-by-uuid.command.js +14 -0
- package/build/commands/tools/presentation/find-presentation-outline.command.js +14 -0
- package/build/commands/tools/presentation/find-presentations.command.js +18 -0
- package/build/commands/tools/presentation/generate-presentation-slides.command.js +14 -0
- package/build/commands/tools/presentation/get-presentation-config.command.js +11 -0
- package/build/commands/tools/presentation/index.js +31 -0
- package/build/commands/tools/presentation/reposition-slide-outline.command.js +15 -0
- package/build/commands/tools/presentation/update-presentation-outline.command.js +15 -0
- package/build/commands/tools/presentation/update-presentation.command.js +17 -0
- package/build/commands/tools/presentation/update-slide-outline.command.js +23 -0
- package/build/constants/errors/errors.js +65 -0
- package/build/constants/index.js +1 -0
- package/build/constants/presentation/enums/index.js +21 -0
- package/build/constants/presentation/enums/presentation-stage.enum.js +14 -0
- package/build/constants/presentation/enums/slide-content-type.enum.js +15 -0
- package/build/constants/presentation/enums/slide-icon-slot-status.enum.js +10 -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 +16 -0
- package/build/models/tools/index.js +1 -0
- package/build/models/tools/language/index.js +17 -0
- package/build/models/tools/language/language.schema.js +11 -0
- package/build/models/tools/presentation/index.js +23 -0
- package/build/models/tools/presentation/pptx-export-payload.schema.js +183 -0
- package/build/models/tools/presentation/presentation-config.schema.js +17 -0
- package/build/models/tools/presentation/presentation-template.schema.js +13 -0
- package/build/models/tools/presentation/presentation.schema.js +24 -0
- package/build/models/tools/presentation/slide-content-type.schema.js +14 -0
- package/build/models/tools/presentation/slide-content.schema.js +177 -0
- package/build/models/tools/presentation/slide-icon-slot.schema.js +15 -0
- package/build/models/tools/presentation/slide-image-slot.schema.js +16 -0
- package/build/models/tools/presentation/slide-outline.schema.js +50 -0
- package/build/models/tools/presentation/slide.schema.js +20 -0
- package/commands/file/calculate-file-cost.command.ts +1 -1
- package/commands/file/upload.command.ts +1 -1
- package/commands/tools/index.ts +1 -0
- package/commands/tools/presentation/create-presentation.command.ts +19 -0
- package/commands/tools/presentation/delete-all-user-presentations.command.ts +6 -0
- package/commands/tools/presentation/delete-presentation.command.ts +11 -0
- package/commands/tools/presentation/delete-slide-outline.command.ts +12 -0
- package/commands/tools/presentation/export-presentation-as-pptx.command.ts +20 -0
- package/commands/tools/presentation/find-presentation-by-uuid.command.ts +16 -0
- package/commands/tools/presentation/find-presentation-outline.command.ts +16 -0
- package/commands/tools/presentation/find-presentations.command.ts +18 -0
- package/commands/tools/presentation/generate-presentation-slides.command.ts +16 -0
- package/commands/tools/presentation/get-presentation-config.command.ts +10 -0
- package/commands/tools/presentation/index.ts +15 -0
- package/commands/tools/presentation/reposition-slide-outline.command.ts +17 -0
- package/commands/tools/presentation/update-presentation-outline.command.ts +21 -0
- package/commands/tools/presentation/update-presentation.command.ts +20 -0
- package/commands/tools/presentation/update-slide-outline.command.ts +26 -0
- package/constants/errors/errors.ts +66 -0
- package/constants/index.ts +1 -0
- package/constants/presentation/enums/index.ts +5 -0
- package/constants/presentation/enums/presentation-stage.enum.ts +13 -0
- package/constants/presentation/enums/slide-content-type.enum.ts +11 -0
- package/constants/presentation/enums/slide-icon-slot-status.enum.ts +6 -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 +14 -0
- package/models/tools/index.ts +1 -0
- package/models/tools/language/index.ts +1 -0
- package/models/tools/language/language.schema.ts +9 -0
- package/models/tools/presentation/index.ts +7 -0
- package/models/tools/presentation/pptx-export-payload.schema.ts +212 -0
- package/models/tools/presentation/presentation-config.schema.ts +16 -0
- package/models/tools/presentation/presentation-template.schema.ts +11 -0
- package/models/tools/presentation/presentation.schema.ts +25 -0
- package/models/tools/presentation/slide-content-type.schema.ts +13 -0
- package/models/tools/presentation/slide-content.schema.ts +218 -0
- package/models/tools/presentation/slide-icon-slot.schema.ts +13 -0
- package/models/tools/presentation/slide-image-slot.schema.ts +14 -0
- package/models/tools/presentation/slide-outline.schema.ts +58 -0
- package/models/tools/presentation/slide.schema.ts +19 -0
- package/package.json +2 -1
|
@@ -0,0 +1,23 @@
|
|
|
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.schema"), exports);
|
|
18
|
+
__exportStar(require("./presentation.schema"), exports);
|
|
19
|
+
__exportStar(require("./slide-content-type.schema"), exports);
|
|
20
|
+
__exportStar(require("./slide-outline.schema"), exports);
|
|
21
|
+
__exportStar(require("./slide.schema"), exports);
|
|
22
|
+
__exportStar(require("./slide-content.schema"), exports);
|
|
23
|
+
__exportStar(require("./presentation-config.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,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresentationWithSlidesSchema = exports.PresentationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
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(constants_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
|
+
slideCount: zod_1.z.number(),
|
|
18
|
+
createdAt: zod_1.z.date(),
|
|
19
|
+
updatedAt: zod_1.z.date(),
|
|
20
|
+
});
|
|
21
|
+
exports.PresentationWithSlidesSchema = exports.PresentationSchema.extend({
|
|
22
|
+
outline: zod_1.z.array(slide_outline_schema_1.SlideOutlineSchema),
|
|
23
|
+
slides: zod_1.z.array(slide_schema_1.SlideSchema),
|
|
24
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlideContentTypeSchema = void 0;
|
|
4
|
+
const constants_1 = require("../../../constants");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.SlideContentTypeSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.nativeEnum(constants_1.SLIDE_CONTENT_TYPE),
|
|
8
|
+
title: zod_1.z.string(),
|
|
9
|
+
layouts: zod_1.z.array(zod_1.z.nativeEnum(constants_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,177 @@
|
|
|
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 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.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(constants_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(constants_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(constants_1.SLIDE_CONTENT_TYPE.STRUCTURED_LIST),
|
|
68
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
69
|
+
description: zod_1.z.string().describe('Description of the slide in about 6 words').min(10).max(200),
|
|
70
|
+
list: zod_1.z
|
|
71
|
+
.array(zod_1.z.object({
|
|
72
|
+
title: zod_1.z.string().describe('List item title in about 6 words').min(10).max(200),
|
|
73
|
+
description: zod_1.z
|
|
74
|
+
.string()
|
|
75
|
+
.describe('List item description in about 6 words')
|
|
76
|
+
.min(10)
|
|
77
|
+
.max(200),
|
|
78
|
+
}))
|
|
79
|
+
.min(4)
|
|
80
|
+
.max(4),
|
|
81
|
+
});
|
|
82
|
+
exports.TextSlideDataSchema = zod_1.z.object({
|
|
83
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TEXT),
|
|
84
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
85
|
+
description: zod_1.z
|
|
86
|
+
.string()
|
|
87
|
+
.describe('Fairly long textual description of the point presented in the title. A couple of paragraphs.')
|
|
88
|
+
.min(300)
|
|
89
|
+
.max(1000),
|
|
90
|
+
});
|
|
91
|
+
exports.ContentsSlideDataSchema = zod_1.z.object({
|
|
92
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.CONTENTS),
|
|
93
|
+
title: zod_1.z
|
|
94
|
+
.string()
|
|
95
|
+
.describe('This slide represents table of contents for the presentation and must be named "Contents" in the presentation language')
|
|
96
|
+
.min(10)
|
|
97
|
+
.max(200),
|
|
98
|
+
items: zod_1.z
|
|
99
|
+
.array(zod_1.z.string().min(1))
|
|
100
|
+
.min(1)
|
|
101
|
+
.describe('List of slide titles. Must be relevant and generated after all the slides are generated'),
|
|
102
|
+
});
|
|
103
|
+
exports.ImageSlideDataSchema = zod_1.z.object({
|
|
104
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.IMAGE),
|
|
105
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
106
|
+
description: zod_1.z.string().describe('Description of the slide in about 6 words').min(10).max(200),
|
|
107
|
+
imageSlot: exports.ImageSlotSchema,
|
|
108
|
+
});
|
|
109
|
+
exports.SectionBreakSlideDataSchema = zod_1.z.object({
|
|
110
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.SECTION_BREAK),
|
|
111
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
112
|
+
description: zod_1.z.string().describe('Description of the slide in about 6 words').min(10).max(200),
|
|
113
|
+
});
|
|
114
|
+
exports.TableSlideDataSchema = zod_1.z.object({
|
|
115
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TABLE),
|
|
116
|
+
title: zod_1.z
|
|
117
|
+
.string()
|
|
118
|
+
.describe('Slide title and table title at the same time in a couple of words')
|
|
119
|
+
.min(10)
|
|
120
|
+
.max(200),
|
|
121
|
+
description: zod_1.z.string().describe('Description of the table represents').min(10).max(200),
|
|
122
|
+
table: zod_1.z.object({
|
|
123
|
+
columnHeaders: zod_1.z
|
|
124
|
+
.array(zod_1.z.string().min(1).max(50))
|
|
125
|
+
.min(1)
|
|
126
|
+
.max(10)
|
|
127
|
+
.describe('Array of column header labels'),
|
|
128
|
+
rows: zod_1.z
|
|
129
|
+
.array(zod_1.z.array(zod_1.z.string().min(1).max(150)))
|
|
130
|
+
.min(2)
|
|
131
|
+
.max(10)
|
|
132
|
+
.describe('Table rows; each row must have exactly the same number of cells as columnHeaders'),
|
|
133
|
+
hasRowHeaders: zod_1.z.boolean().describe('If table needs special row headers, set this to true'),
|
|
134
|
+
hasSummaryRow: zod_1.z.boolean().describe('If table needs a summary row, set this to true'),
|
|
135
|
+
}),
|
|
136
|
+
});
|
|
137
|
+
// Charts
|
|
138
|
+
exports.BarChartSlideDataSchema = zod_1.z.object({
|
|
139
|
+
type: zod_1.z.literal(SLIDE_CHART_TYPE.BAR),
|
|
140
|
+
categories: zod_1.z
|
|
141
|
+
.array(zod_1.z.string().min(1).max(12))
|
|
142
|
+
.min(1)
|
|
143
|
+
.max(12)
|
|
144
|
+
.describe('Category labels (e.g., months, products, regions)'),
|
|
145
|
+
series: zod_1.z
|
|
146
|
+
.array(zod_1.z.object({
|
|
147
|
+
name: zod_1.z.string().min(1).max(12).describe('Series name for legend'),
|
|
148
|
+
data: zod_1.z.array(zod_1.z.number()).describe('Values corresponding to categories'),
|
|
149
|
+
type: zod_1.z
|
|
150
|
+
.number()
|
|
151
|
+
.min(0)
|
|
152
|
+
.max(11)
|
|
153
|
+
.describe('Series type. Used to discriminate colors when applying theme'),
|
|
154
|
+
}))
|
|
155
|
+
.min(1)
|
|
156
|
+
.max(12)
|
|
157
|
+
.describe('Data series for the chart'),
|
|
158
|
+
yAxisLabel: zod_1.z.string().max(40).optional().describe('Y-axis label'),
|
|
159
|
+
unit: zod_1.z.string().max(10).optional().describe('Unit symbol (%, $, etc.)'),
|
|
160
|
+
});
|
|
161
|
+
exports.ChartSlideDataSchema = zod_1.z.object({
|
|
162
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.CHART),
|
|
163
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
|
|
164
|
+
description: zod_1.z.string().describe('Description of the slide in about 6 words').min(10).max(200),
|
|
165
|
+
chart: zod_1.z.discriminatedUnion('type', [exports.BarChartSlideDataSchema]),
|
|
166
|
+
});
|
|
167
|
+
exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
168
|
+
exports.CoverSlideDataSchema,
|
|
169
|
+
exports.StructuredListSlideDataSchema,
|
|
170
|
+
exports.TextSlideDataSchema,
|
|
171
|
+
exports.ContentsSlideDataSchema,
|
|
172
|
+
exports.SectionBreakSlideDataSchema,
|
|
173
|
+
exports.ImageSlideDataSchema,
|
|
174
|
+
exports.ThankYouSlideDataSchema,
|
|
175
|
+
exports.TableSlideDataSchema,
|
|
176
|
+
exports.ChartSlideDataSchema,
|
|
177
|
+
]);
|
|
@@ -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,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 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
|
+
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(constants_1.SLIDE_CONTENT_TYPE),
|
|
13
|
+
layoutId: zod_1.z.nativeEnum(constants_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
|
+
});
|
|
@@ -9,7 +9,7 @@ export namespace CalculateFileCostCommand {
|
|
|
9
9
|
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
10
10
|
|
|
11
11
|
export const RequestSchema = z.object({
|
|
12
|
-
|
|
12
|
+
modelId: z.string().uuid(),
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
export type Request = z.infer<typeof RequestSchema>;
|
package/commands/tools/index.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PresentationSchema } from '../../../models/tools/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,11 @@
|
|
|
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 const ResponseSchema = z.void();
|
|
9
|
+
|
|
10
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
|
+
}
|
|
@@ -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/tools/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
|
+
}
|