@purpleschool/gptbot 0.11.6 → 0.11.7
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/commands/tools/presentation/create-presentation.command.js +3 -0
- package/build/commands/tools/presentation/update-presentation.command.js +1 -0
- package/build/constants/presentation/enums/index.js +1 -0
- package/build/constants/presentation/enums/presentation-target-audience.enum.js +10 -0
- package/build/models/tools/presentation/index.js +1 -0
- package/build/models/tools/presentation/presentation-template.schema.js +1 -0
- package/build/models/tools/presentation/presentation-title-page.schema.js +9 -0
- package/build/models/tools/presentation/presentation.schema.js +3 -0
- package/build/models/tools/presentation/slide-content-edit.schema.js +18 -12
- package/build/models/tools/presentation/slide-content.schema.js +16 -12
- package/commands/tools/presentation/create-presentation.command.ts +7 -1
- package/commands/tools/presentation/update-presentation.command.ts +1 -0
- package/constants/presentation/enums/index.ts +1 -0
- package/constants/presentation/enums/presentation-target-audience.enum.ts +6 -0
- package/models/tools/presentation/index.ts +1 -0
- package/models/tools/presentation/presentation-template.schema.ts +1 -0
- package/models/tools/presentation/presentation-title-page.schema.ts +9 -0
- package/models/tools/presentation/presentation.schema.ts +8 -1
- package/models/tools/presentation/slide-content-edit.schema.ts +18 -12
- package/models/tools/presentation/slide-content.schema.ts +25 -21
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CreatePresentationCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const presentation_1 = require("../../../models/tools/presentation");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
6
7
|
var CreatePresentationCommand;
|
|
7
8
|
(function (CreatePresentationCommand) {
|
|
8
9
|
CreatePresentationCommand.RequestSchema = zod_1.z.object({
|
|
@@ -10,6 +11,8 @@ var CreatePresentationCommand;
|
|
|
10
11
|
slideCount: zod_1.z.number().min(1).max(20),
|
|
11
12
|
templateId: zod_1.z.string().uuid(),
|
|
12
13
|
languageId: zod_1.z.string().uuid(),
|
|
14
|
+
titlePage: presentation_1.PresentationTitlePageSchema.optional().nullable(),
|
|
15
|
+
targetAudience: zod_1.z.nativeEnum(constants_1.PRESENTATION_TARGET_AUDIENCE).optional(),
|
|
13
16
|
});
|
|
14
17
|
CreatePresentationCommand.ResponseSchema = zod_1.z.object({
|
|
15
18
|
data: presentation_1.PresentationSchema,
|
|
@@ -11,6 +11,7 @@ var UpdatePresentationCommand;
|
|
|
11
11
|
UpdatePresentationCommand.RequestBodySchema = presentation_1.PresentationSchema.pick({
|
|
12
12
|
title: true,
|
|
13
13
|
templateId: true,
|
|
14
|
+
titlePage: true,
|
|
14
15
|
}).partial();
|
|
15
16
|
UpdatePresentationCommand.ResponseSchema = zod_1.z.object({
|
|
16
17
|
data: presentation_1.PresentationSchema,
|
|
@@ -23,3 +23,4 @@ __exportStar(require("./slide-image-slot-action.enum"), exports);
|
|
|
23
23
|
__exportStar(require("./presentation-ai-action-type.enum"), exports);
|
|
24
24
|
__exportStar(require("./presentation-ai-action-pricing-type.enum"), exports);
|
|
25
25
|
__exportStar(require("./presentation-ai-action-call-status.enum"), exports);
|
|
26
|
+
__exportStar(require("./presentation-target-audience.enum"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PRESENTATION_TARGET_AUDIENCE = void 0;
|
|
4
|
+
var PRESENTATION_TARGET_AUDIENCE;
|
|
5
|
+
(function (PRESENTATION_TARGET_AUDIENCE) {
|
|
6
|
+
PRESENTATION_TARGET_AUDIENCE["NONE"] = "NONE";
|
|
7
|
+
PRESENTATION_TARGET_AUDIENCE["SCHOOL"] = "SCHOOL";
|
|
8
|
+
PRESENTATION_TARGET_AUDIENCE["UNIVERSITY"] = "UNIVERSITY";
|
|
9
|
+
PRESENTATION_TARGET_AUDIENCE["BUSINESS"] = "BUSINESS";
|
|
10
|
+
})(PRESENTATION_TARGET_AUDIENCE || (exports.PRESENTATION_TARGET_AUDIENCE = PRESENTATION_TARGET_AUDIENCE = {}));
|
|
@@ -22,3 +22,4 @@ __exportStar(require("./slide.schema"), exports);
|
|
|
22
22
|
__exportStar(require("./slide-content.schema"), exports);
|
|
23
23
|
__exportStar(require("./presentation-config.schema"), exports);
|
|
24
24
|
__exportStar(require("./presentation-ai-action.schema"), exports);
|
|
25
|
+
__exportStar(require("./presentation-title-page.schema"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresentationTitlePageSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PresentationTitlePageSchema = zod_1.z.object({
|
|
6
|
+
author: zod_1.z.string().optional().nullable(),
|
|
7
|
+
createdAt: zod_1.z.coerce.date().optional().nullable(),
|
|
8
|
+
email: zod_1.z.string().email().optional().nullable(),
|
|
9
|
+
});
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
6
|
const slide_outline_schema_1 = require("./slide-outline.schema");
|
|
7
7
|
const slide_schema_1 = require("./slide.schema");
|
|
8
|
+
const presentation_title_page_schema_1 = require("./presentation-title-page.schema");
|
|
8
9
|
exports.PresentationSchema = zod_1.z.object({
|
|
9
10
|
uuid: zod_1.z.string().uuid(),
|
|
10
11
|
prompt: zod_1.z.string(),
|
|
@@ -19,6 +20,8 @@ exports.PresentationSchema = zod_1.z.object({
|
|
|
19
20
|
slideCount: zod_1.z.number(),
|
|
20
21
|
lastContentUpdateAt: zod_1.z.date().nullable(),
|
|
21
22
|
lastPptxExportedAt: zod_1.z.date().nullable(),
|
|
23
|
+
titlePage: presentation_title_page_schema_1.PresentationTitlePageSchema.nullable(),
|
|
24
|
+
targetAudience: zod_1.z.nativeEnum(constants_1.PRESENTATION_TARGET_AUDIENCE),
|
|
22
25
|
createdAt: zod_1.z.date(),
|
|
23
26
|
updatedAt: zod_1.z.date(),
|
|
24
27
|
});
|
|
@@ -10,18 +10,24 @@ const constants_1 = require("../../../constants");
|
|
|
10
10
|
exports.CoverSlideDataUserEditSchema = zod_1.default.object({
|
|
11
11
|
contentType: zod_1.default.literal(constants_1.SLIDE_CONTENT_TYPE.COVER),
|
|
12
12
|
title: zod_1.default.string().max(1000),
|
|
13
|
-
author: zod_1.default
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
author: zod_1.default
|
|
14
|
+
.object({
|
|
15
|
+
label: zod_1.default.string().min(1).max(100),
|
|
16
|
+
value: zod_1.default.string().min(1).max(200),
|
|
17
|
+
})
|
|
18
|
+
.optional(),
|
|
19
|
+
date: zod_1.default
|
|
20
|
+
.object({
|
|
21
|
+
label: zod_1.default.string().min(1).max(100),
|
|
22
|
+
value: zod_1.default.string().min(1).max(200),
|
|
23
|
+
})
|
|
24
|
+
.optional(),
|
|
25
|
+
email: zod_1.default
|
|
26
|
+
.object({
|
|
27
|
+
label: zod_1.default.string().min(1).max(100),
|
|
28
|
+
value: zod_1.default.string().min(1).max(200),
|
|
29
|
+
})
|
|
30
|
+
.optional(),
|
|
25
31
|
version: zod_1.default.literal(1),
|
|
26
32
|
});
|
|
27
33
|
exports.ThankYouSlideDataUserEditSchema = zod_1.default.object({
|
|
@@ -24,22 +24,26 @@ exports.IconSlotSchema = zod_1.z.object({
|
|
|
24
24
|
exports.CoverSlideDataSchema = zod_1.z.object({
|
|
25
25
|
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.COVER),
|
|
26
26
|
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
27
|
-
author: zod_1.z
|
|
27
|
+
author: zod_1.z
|
|
28
|
+
.object({
|
|
28
29
|
label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
|
|
29
|
-
value: zod_1.z
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
value: zod_1.z.string().describe('Author value from titlePage if provided'),
|
|
31
|
+
})
|
|
32
|
+
.optional(),
|
|
33
|
+
date: zod_1.z
|
|
34
|
+
.object({
|
|
34
35
|
label: zod_1.z.string().describe('Literal "Date" in presentation\'s language'),
|
|
35
36
|
value: zod_1.z
|
|
36
37
|
.string()
|
|
37
|
-
.describe('Date
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
.describe('Date from titlePage in the "dd month yyyy" format in presentation\'s locale'),
|
|
39
|
+
})
|
|
40
|
+
.optional(),
|
|
41
|
+
email: zod_1.z
|
|
42
|
+
.object({
|
|
43
|
+
label: zod_1.z.string().describe('Localized contact/email label'),
|
|
44
|
+
value: zod_1.z.string().describe('Email value from titlePage if provided'),
|
|
45
|
+
})
|
|
46
|
+
.optional(),
|
|
43
47
|
version: zod_1.z.literal(1),
|
|
44
48
|
});
|
|
45
49
|
exports.ThankYouSlideDataSchema = zod_1.z.object({
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
PresentationSchema,
|
|
4
|
+
PresentationTitlePageSchema,
|
|
5
|
+
} from '../../../models/tools/presentation';
|
|
6
|
+
import { PRESENTATION_TARGET_AUDIENCE } from '../../../constants';
|
|
3
7
|
|
|
4
8
|
export namespace CreatePresentationCommand {
|
|
5
9
|
export const RequestSchema = z.object({
|
|
@@ -7,6 +11,8 @@ export namespace CreatePresentationCommand {
|
|
|
7
11
|
slideCount: z.number().min(1).max(20),
|
|
8
12
|
templateId: z.string().uuid(),
|
|
9
13
|
languageId: z.string().uuid(),
|
|
14
|
+
titlePage: PresentationTitlePageSchema.optional().nullable(),
|
|
15
|
+
targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE).optional(),
|
|
10
16
|
});
|
|
11
17
|
|
|
12
18
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -7,3 +7,4 @@ export * from './slide-image-slot-action.enum';
|
|
|
7
7
|
export * from './presentation-ai-action-type.enum';
|
|
8
8
|
export * from './presentation-ai-action-pricing-type.enum';
|
|
9
9
|
export * from './presentation-ai-action-call-status.enum';
|
|
10
|
+
export * from './presentation-target-audience.enum';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const PresentationTitlePageSchema = z.object({
|
|
4
|
+
author: z.string().optional().nullable(),
|
|
5
|
+
createdAt: z.coerce.date().optional().nullable(),
|
|
6
|
+
email: z.string().email().optional().nullable(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type PresentationTitlePage = z.infer<typeof PresentationTitlePageSchema>;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
PRESENTATION_STAGE,
|
|
4
|
+
PRESENTATION_TARGET_AUDIENCE,
|
|
5
|
+
USER_REACTION,
|
|
6
|
+
} from '../../../constants';
|
|
3
7
|
import { SlideOutlineSchema } from './slide-outline.schema';
|
|
4
8
|
import { SlideSchema } from './slide.schema';
|
|
9
|
+
import { PresentationTitlePageSchema } from './presentation-title-page.schema';
|
|
5
10
|
|
|
6
11
|
export const PresentationSchema = z.object({
|
|
7
12
|
uuid: z.string().uuid(),
|
|
@@ -17,6 +22,8 @@ export const PresentationSchema = z.object({
|
|
|
17
22
|
slideCount: z.number(),
|
|
18
23
|
lastContentUpdateAt: z.date().nullable(),
|
|
19
24
|
lastPptxExportedAt: z.date().nullable(),
|
|
25
|
+
titlePage: PresentationTitlePageSchema.nullable(),
|
|
26
|
+
targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE),
|
|
20
27
|
createdAt: z.date(),
|
|
21
28
|
updatedAt: z.date(),
|
|
22
29
|
});
|
|
@@ -19,18 +19,24 @@ import { SLIDE_CONTENT_TYPE } from '../../../constants';
|
|
|
19
19
|
export const CoverSlideDataUserEditSchema = z.object({
|
|
20
20
|
contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
|
|
21
21
|
title: z.string().max(1000),
|
|
22
|
-
author: z
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
author: z
|
|
23
|
+
.object({
|
|
24
|
+
label: z.string().min(1).max(100),
|
|
25
|
+
value: z.string().min(1).max(200),
|
|
26
|
+
})
|
|
27
|
+
.optional(),
|
|
28
|
+
date: z
|
|
29
|
+
.object({
|
|
30
|
+
label: z.string().min(1).max(100),
|
|
31
|
+
value: z.string().min(1).max(200),
|
|
32
|
+
})
|
|
33
|
+
.optional(),
|
|
34
|
+
email: z
|
|
35
|
+
.object({
|
|
36
|
+
label: z.string().min(1).max(100),
|
|
37
|
+
value: z.string().min(1).max(200),
|
|
38
|
+
})
|
|
39
|
+
.optional(),
|
|
34
40
|
version: z.literal(1),
|
|
35
41
|
}) satisfies z.ZodType<ICoverSlideDataStructure>;
|
|
36
42
|
|
|
@@ -26,9 +26,9 @@ export type IconSlot = z.infer<typeof IconSlotSchema>;
|
|
|
26
26
|
export interface ICoverSlideDataStructure {
|
|
27
27
|
contentType: SLIDE_CONTENT_TYPE.COVER;
|
|
28
28
|
title: string;
|
|
29
|
-
author
|
|
30
|
-
date
|
|
31
|
-
email
|
|
29
|
+
author?: { label: string; value: string };
|
|
30
|
+
date?: { label: string; value: string };
|
|
31
|
+
email?: { label: string; value: string };
|
|
32
32
|
version: 1;
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -125,24 +125,28 @@ export interface ITimelineSlideDataStructure {
|
|
|
125
125
|
export const CoverSlideDataSchema = z.object({
|
|
126
126
|
contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
|
|
127
127
|
title: z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
128
|
-
author: z
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
.string()
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
date: z
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
128
|
+
author: z
|
|
129
|
+
.object({
|
|
130
|
+
label: z.string().describe('Literal "Author" in presentation\'s language'),
|
|
131
|
+
value: z.string().describe('Author value from titlePage if provided'),
|
|
132
|
+
})
|
|
133
|
+
.optional(),
|
|
134
|
+
date: z
|
|
135
|
+
.object({
|
|
136
|
+
label: z.string().describe('Literal "Date" in presentation\'s language'),
|
|
137
|
+
value: z
|
|
138
|
+
.string()
|
|
139
|
+
.describe(
|
|
140
|
+
'Date from titlePage in the "dd month yyyy" format in presentation\'s locale',
|
|
141
|
+
),
|
|
142
|
+
})
|
|
143
|
+
.optional(),
|
|
144
|
+
email: z
|
|
145
|
+
.object({
|
|
146
|
+
label: z.string().describe('Localized contact/email label'),
|
|
147
|
+
value: z.string().describe('Email value from titlePage if provided'),
|
|
148
|
+
})
|
|
149
|
+
.optional(),
|
|
146
150
|
version: z.literal(1),
|
|
147
151
|
}) satisfies z.ZodType<ICoverSlideDataStructure>;
|
|
148
152
|
export type CoverSlideData = z.infer<typeof CoverSlideDataSchema>;
|