@purpleschool/gptbot 0.8.7 → 0.8.8
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/constants/presentation/enums/slide-content-type.enum.js +1 -0
- package/build/constants/presentation/maps/slide-layout-map.constant.js +1 -0
- package/build/models/tools/presentation/slide-content-edit.schema.js +18 -1
- package/build/models/tools/presentation/slide-content.schema.js +26 -1
- package/constants/presentation/enums/slide-content-type.enum.ts +1 -0
- package/constants/presentation/maps/slide-layout-map.constant.ts +1 -0
- package/models/tools/presentation/slide-content-edit.schema.ts +21 -0
- package/models/tools/presentation/slide-content.schema.ts +45 -0
- package/package.json +1 -1
|
@@ -12,4 +12,5 @@ var SLIDE_CONTENT_TYPE;
|
|
|
12
12
|
SLIDE_CONTENT_TYPE["THANK_YOU"] = "THANK_YOU";
|
|
13
13
|
SLIDE_CONTENT_TYPE["TABLE"] = "TABLE";
|
|
14
14
|
SLIDE_CONTENT_TYPE["CHART"] = "CHART";
|
|
15
|
+
SLIDE_CONTENT_TYPE["TIMELINE"] = "TIMELINE";
|
|
15
16
|
})(SLIDE_CONTENT_TYPE || (exports.SLIDE_CONTENT_TYPE = SLIDE_CONTENT_TYPE = {}));
|
|
@@ -13,4 +13,5 @@ exports.SLIDE_LAYOUT_MAP = new Map([
|
|
|
13
13
|
[enums_1.SLIDE_CONTENT_TYPE.THANK_YOU, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
|
|
14
14
|
[enums_1.SLIDE_CONTENT_TYPE.TABLE, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
|
|
15
15
|
[enums_1.SLIDE_CONTENT_TYPE.CHART, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
|
|
16
|
+
[enums_1.SLIDE_CONTENT_TYPE.TIMELINE, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
|
|
16
17
|
]);
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SlideContentUserEditSchema = exports.ChartSlideDataUserEditSchema = exports.BarChartSlideDataUserEditSchema = exports.TableSlideDataUserEditSchema = exports.SectionBreakSlideDataUserEditSchema = exports.ImageSlideDataUserEditSchema = exports.ContentsSlideDataUserEditSchema = exports.StructuredListSlideDataUserEditSchema = exports.TextSlideDataUserEditSchema = exports.ThankYouSlideDataUserEditSchema = exports.CoverSlideDataUserEditSchema = void 0;
|
|
6
|
+
exports.SlideContentUserEditSchema = exports.TimelineSlideDataUserEditSchema = exports.ChartSlideDataUserEditSchema = exports.BarChartSlideDataUserEditSchema = exports.TableSlideDataUserEditSchema = exports.SectionBreakSlideDataUserEditSchema = exports.ImageSlideDataUserEditSchema = exports.ContentsSlideDataUserEditSchema = exports.StructuredListSlideDataUserEditSchema = exports.TextSlideDataUserEditSchema = exports.ThankYouSlideDataUserEditSchema = exports.CoverSlideDataUserEditSchema = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
const slide_content_schema_1 = require("./slide-content.schema");
|
|
9
9
|
const constants_1 = require("../../../constants");
|
|
@@ -116,6 +116,22 @@ exports.ChartSlideDataUserEditSchema = zod_1.default.object({
|
|
|
116
116
|
chart: zod_1.default.discriminatedUnion('type', [exports.BarChartSlideDataUserEditSchema]),
|
|
117
117
|
version: zod_1.default.literal(1),
|
|
118
118
|
});
|
|
119
|
+
exports.TimelineSlideDataUserEditSchema = zod_1.default.object({
|
|
120
|
+
contentType: zod_1.default.literal(constants_1.SLIDE_CONTENT_TYPE.TIMELINE),
|
|
121
|
+
title: zod_1.default.string().min(1).max(500),
|
|
122
|
+
description: zod_1.default.string().min(1).max(1000),
|
|
123
|
+
timeline: zod_1.default.object({
|
|
124
|
+
events: zod_1.default
|
|
125
|
+
.array(zod_1.default.object({
|
|
126
|
+
date: zod_1.default.string().min(1).max(100),
|
|
127
|
+
title: zod_1.default.string().min(1).max(200),
|
|
128
|
+
description: zod_1.default.string().min(1).max(500),
|
|
129
|
+
}))
|
|
130
|
+
.min(2)
|
|
131
|
+
.max(10),
|
|
132
|
+
}),
|
|
133
|
+
version: zod_1.default.literal(1),
|
|
134
|
+
});
|
|
119
135
|
exports.SlideContentUserEditSchema = zod_1.default.discriminatedUnion('contentType', [
|
|
120
136
|
exports.CoverSlideDataUserEditSchema,
|
|
121
137
|
exports.StructuredListSlideDataUserEditSchema,
|
|
@@ -126,4 +142,5 @@ exports.SlideContentUserEditSchema = zod_1.default.discriminatedUnion('contentTy
|
|
|
126
142
|
exports.ThankYouSlideDataUserEditSchema,
|
|
127
143
|
exports.TableSlideDataUserEditSchema,
|
|
128
144
|
exports.ChartSlideDataUserEditSchema,
|
|
145
|
+
exports.TimelineSlideDataUserEditSchema,
|
|
129
146
|
]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
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;
|
|
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
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
6
|
var SLIDE_CHART_TYPE;
|
|
@@ -180,6 +180,30 @@ exports.ChartSlideDataSchema = zod_1.z.object({
|
|
|
180
180
|
chart: zod_1.z.discriminatedUnion('type', [exports.BarChartSlideDataSchema]),
|
|
181
181
|
version: zod_1.z.literal(1),
|
|
182
182
|
});
|
|
183
|
+
exports.TimelineSlideDataSchema = zod_1.z.object({
|
|
184
|
+
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TIMELINE),
|
|
185
|
+
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
186
|
+
description: zod_1.z.string().describe('Brief context for the timeline').min(10).max(200),
|
|
187
|
+
timeline: zod_1.z.object({
|
|
188
|
+
events: zod_1.z
|
|
189
|
+
.array(zod_1.z.object({
|
|
190
|
+
date: zod_1.z
|
|
191
|
+
.string()
|
|
192
|
+
.describe('Date or time period label. MUST be general/approximate if exact date unknown (e.g., "Early 2020s", "Mid-1990s", "Recent years")')
|
|
193
|
+
.min(2)
|
|
194
|
+
.max(50),
|
|
195
|
+
title: zod_1.z.string().describe('Event title in 2-4 words').min(5).max(80),
|
|
196
|
+
description: zod_1.z
|
|
197
|
+
.string()
|
|
198
|
+
.describe('Brief description of the event or milestone')
|
|
199
|
+
.min(20)
|
|
200
|
+
.max(150),
|
|
201
|
+
}))
|
|
202
|
+
.length(5)
|
|
203
|
+
.describe('Timeline must contain exactly 5 chronological events'),
|
|
204
|
+
}),
|
|
205
|
+
version: zod_1.z.literal(1),
|
|
206
|
+
});
|
|
183
207
|
exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
184
208
|
exports.CoverSlideDataSchema,
|
|
185
209
|
exports.StructuredListSlideDataSchema,
|
|
@@ -190,4 +214,5 @@ exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
|
190
214
|
exports.ThankYouSlideDataSchema,
|
|
191
215
|
exports.TableSlideDataSchema,
|
|
192
216
|
exports.ChartSlideDataSchema,
|
|
217
|
+
exports.TimelineSlideDataSchema,
|
|
193
218
|
]);
|
|
@@ -11,4 +11,5 @@ export const SLIDE_LAYOUT_MAP = new Map<SLIDE_CONTENT_TYPE, SLIDE_LAYOUT[]>([
|
|
|
11
11
|
[SLIDE_CONTENT_TYPE.THANK_YOU, [SLIDE_LAYOUT.TYPE_1]],
|
|
12
12
|
[SLIDE_CONTENT_TYPE.TABLE, [SLIDE_LAYOUT.TYPE_1]],
|
|
13
13
|
[SLIDE_CONTENT_TYPE.CHART, [SLIDE_LAYOUT.TYPE_1]],
|
|
14
|
+
[SLIDE_CONTENT_TYPE.TIMELINE, [SLIDE_LAYOUT.TYPE_1]],
|
|
14
15
|
]);
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
IBarChartSlideDataStructure,
|
|
13
13
|
IChartSlideDataStructure,
|
|
14
14
|
ImageSlotSchema,
|
|
15
|
+
ITimelineSlideDataStructure,
|
|
15
16
|
} from './slide-content.schema';
|
|
16
17
|
import { SLIDE_CONTENT_TYPE } from '../../../constants';
|
|
17
18
|
|
|
@@ -140,6 +141,25 @@ export const ChartSlideDataUserEditSchema = z.object({
|
|
|
140
141
|
version: z.literal(1),
|
|
141
142
|
}) satisfies z.ZodType<IChartSlideDataStructure>;
|
|
142
143
|
|
|
144
|
+
export const TimelineSlideDataUserEditSchema = z.object({
|
|
145
|
+
contentType: z.literal(SLIDE_CONTENT_TYPE.TIMELINE),
|
|
146
|
+
title: z.string().min(1).max(500),
|
|
147
|
+
description: z.string().min(1).max(1000),
|
|
148
|
+
timeline: z.object({
|
|
149
|
+
events: z
|
|
150
|
+
.array(
|
|
151
|
+
z.object({
|
|
152
|
+
date: z.string().min(1).max(100),
|
|
153
|
+
title: z.string().min(1).max(200),
|
|
154
|
+
description: z.string().min(1).max(500),
|
|
155
|
+
}),
|
|
156
|
+
)
|
|
157
|
+
.min(2)
|
|
158
|
+
.max(10),
|
|
159
|
+
}),
|
|
160
|
+
version: z.literal(1),
|
|
161
|
+
}) satisfies z.ZodType<ITimelineSlideDataStructure>;
|
|
162
|
+
|
|
143
163
|
export const SlideContentUserEditSchema = z.discriminatedUnion('contentType', [
|
|
144
164
|
CoverSlideDataUserEditSchema,
|
|
145
165
|
StructuredListSlideDataUserEditSchema,
|
|
@@ -150,5 +170,6 @@ export const SlideContentUserEditSchema = z.discriminatedUnion('contentType', [
|
|
|
150
170
|
ThankYouSlideDataUserEditSchema,
|
|
151
171
|
TableSlideDataUserEditSchema,
|
|
152
172
|
ChartSlideDataUserEditSchema,
|
|
173
|
+
TimelineSlideDataUserEditSchema,
|
|
153
174
|
]);
|
|
154
175
|
export type SlideContentUserEdit = z.infer<typeof SlideContentUserEditSchema>;
|
|
@@ -108,6 +108,20 @@ export interface IChartSlideDataStructure {
|
|
|
108
108
|
version: 1;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
export interface ITimelineSlideDataStructure {
|
|
112
|
+
contentType: SLIDE_CONTENT_TYPE.TIMELINE;
|
|
113
|
+
title: string;
|
|
114
|
+
description: string;
|
|
115
|
+
timeline: {
|
|
116
|
+
events: Array<{
|
|
117
|
+
date: string;
|
|
118
|
+
title: string;
|
|
119
|
+
description: string;
|
|
120
|
+
}>;
|
|
121
|
+
};
|
|
122
|
+
version: 1;
|
|
123
|
+
}
|
|
124
|
+
|
|
111
125
|
export const CoverSlideDataSchema = z.object({
|
|
112
126
|
contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
|
|
113
127
|
title: z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
@@ -307,6 +321,36 @@ export const ChartSlideDataSchema = z.object({
|
|
|
307
321
|
}) satisfies z.ZodType<IChartSlideDataStructure>;
|
|
308
322
|
export type ChartSlideData = z.infer<typeof ChartSlideDataSchema>;
|
|
309
323
|
|
|
324
|
+
export const TimelineSlideDataSchema = z.object({
|
|
325
|
+
contentType: z.literal(SLIDE_CONTENT_TYPE.TIMELINE),
|
|
326
|
+
title: z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
327
|
+
description: z.string().describe('Brief context for the timeline').min(10).max(200),
|
|
328
|
+
timeline: z.object({
|
|
329
|
+
events: z
|
|
330
|
+
.array(
|
|
331
|
+
z.object({
|
|
332
|
+
date: z
|
|
333
|
+
.string()
|
|
334
|
+
.describe(
|
|
335
|
+
'Date or time period label. MUST be general/approximate if exact date unknown (e.g., "Early 2020s", "Mid-1990s", "Recent years")',
|
|
336
|
+
)
|
|
337
|
+
.min(2)
|
|
338
|
+
.max(50),
|
|
339
|
+
title: z.string().describe('Event title in 2-4 words').min(5).max(80),
|
|
340
|
+
description: z
|
|
341
|
+
.string()
|
|
342
|
+
.describe('Brief description of the event or milestone')
|
|
343
|
+
.min(20)
|
|
344
|
+
.max(150),
|
|
345
|
+
}),
|
|
346
|
+
)
|
|
347
|
+
.length(5)
|
|
348
|
+
.describe('Timeline must contain exactly 5 chronological events'),
|
|
349
|
+
}),
|
|
350
|
+
version: z.literal(1),
|
|
351
|
+
}) satisfies z.ZodType<ITimelineSlideDataStructure>;
|
|
352
|
+
export type TimelineSlideData = z.infer<typeof TimelineSlideDataSchema>;
|
|
353
|
+
|
|
310
354
|
export const SlideContentSchema = z.discriminatedUnion('contentType', [
|
|
311
355
|
CoverSlideDataSchema,
|
|
312
356
|
StructuredListSlideDataSchema,
|
|
@@ -317,5 +361,6 @@ export const SlideContentSchema = z.discriminatedUnion('contentType', [
|
|
|
317
361
|
ThankYouSlideDataSchema,
|
|
318
362
|
TableSlideDataSchema,
|
|
319
363
|
ChartSlideDataSchema,
|
|
364
|
+
TimelineSlideDataSchema,
|
|
320
365
|
]);
|
|
321
366
|
export type SlideContent = z.infer<typeof SlideContentSchema>;
|