@purpleschool/gptbot 0.7.77 → 0.7.78
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/presentation.ts +10 -0
- package/build/api/controllers/http/presentation.js +7 -0
- package/build/commands/auth/register-user.command.js +1 -18
- package/build/commands/auth/vk-login.command.js +1 -18
- package/build/commands/auth/yandex-login.command.js +1 -18
- package/build/commands/product/buy-product.command.js +1 -25
- package/build/commands/subscription/buy-subscription.command.js +1 -25
- package/build/commands/telegram-auth/create-telegram-auth-link.command.js +1 -19
- package/build/commands/telegram-profile/auth-with-telegram-web-app.command.js +0 -7
- package/build/commands/tools/presentation/build-blank-slide.command.js +21 -0
- package/build/commands/tools/presentation/generate-and-insert-slide.command.js +22 -0
- package/build/commands/tools/presentation/index.js +7 -0
- package/build/commands/tools/presentation/presentation-generate-report.command.js +17 -0
- package/build/commands/tools/presentation/presentation-paraphrase.command.js +20 -0
- package/build/commands/tools/presentation/update-presentation-slides.command.js +25 -0
- package/build/commands/tools/presentation/update-presentation.command.js +4 -3
- package/build/commands/tools/presentation/update-slide-image-slot.command.js +34 -0
- package/build/commands/tools/presentation/update-slide.command.js +19 -0
- package/build/constants/errors/errors.js +10 -2
- package/build/constants/presentation/enums/index.js +4 -0
- package/build/constants/presentation/enums/presentation-ai-action-call-status.enum.js +9 -0
- package/build/constants/presentation/enums/presentation-ai-action-pricing-type.enum.js +8 -0
- package/build/constants/presentation/enums/presentation-ai-action-type.enum.js +8 -0
- package/build/constants/presentation/enums/slide-image-slot-action.enum.js +8 -0
- package/build/constants/webmaster/enums/organization-type.enum.js +1 -0
- package/build/helpers/index.js +1 -0
- package/build/helpers/presentation/calculate-presentation-ai-action-price.util.js +16 -0
- package/build/helpers/presentation/index.js +17 -0
- package/build/models/tools/index.js +1 -0
- package/build/models/tools/presentation/index.js +1 -0
- package/build/models/tools/presentation/presentation-ai-action.schema.js +27 -0
- package/build/models/tools/presentation/presentation-config.schema.js +3 -0
- package/build/models/tools/presentation/presentation.schema.js +2 -0
- package/build/models/tools/presentation/slide-content-edit.schema.js +129 -0
- package/build/models/tools/presentation/slide-content.schema.js +22 -20
- package/build/models/tools/presentation/slide.schema.js +39 -1
- package/build/models/user-referrals.schema.js +0 -6
- package/commands/auth/register-user.command.ts +1 -23
- package/commands/auth/vk-login.command.ts +1 -23
- package/commands/auth/yandex-login.command.ts +1 -23
- package/commands/product/buy-product.command.ts +9 -38
- package/commands/subscription/buy-subscription.command.ts +9 -38
- package/commands/telegram-auth/create-telegram-auth-link.command.ts +1 -24
- package/commands/telegram-profile/auth-with-telegram-web-app.command.ts +0 -7
- package/commands/tools/presentation/build-blank-slide.command.ts +23 -0
- package/commands/tools/presentation/generate-and-insert-slide.command.ts +27 -0
- package/commands/tools/presentation/index.ts +7 -0
- package/commands/tools/presentation/presentation-generate-report.command.ts +21 -0
- package/commands/tools/presentation/presentation-paraphrase.command.ts +26 -0
- package/commands/tools/presentation/update-presentation-slides.command.ts +32 -0
- package/commands/tools/presentation/update-presentation.command.ts +5 -4
- package/commands/tools/presentation/update-slide-image-slot.command.ts +40 -0
- package/commands/tools/presentation/update-slide.command.ts +25 -0
- package/constants/errors/errors.ts +10 -2
- package/constants/presentation/enums/index.ts +4 -0
- package/constants/presentation/enums/presentation-ai-action-call-status.enum.ts +5 -0
- package/constants/presentation/enums/presentation-ai-action-pricing-type.enum.ts +4 -0
- package/constants/presentation/enums/presentation-ai-action-type.enum.ts +4 -0
- package/constants/presentation/enums/slide-image-slot-action.enum.ts +4 -0
- package/constants/webmaster/enums/organization-type.enum.ts +1 -0
- package/helpers/index.ts +1 -0
- package/helpers/presentation/calculate-presentation-ai-action-price.util.ts +20 -0
- package/helpers/presentation/index.ts +1 -0
- package/models/tools/index.ts +1 -0
- package/models/tools/presentation/index.ts +1 -0
- package/models/tools/presentation/presentation-ai-action.schema.ts +33 -0
- package/models/tools/presentation/presentation-config.schema.ts +3 -0
- package/models/tools/presentation/presentation.schema.ts +2 -0
- package/models/tools/presentation/slide-content-edit.schema.ts +154 -0
- package/models/tools/presentation/slide-content.schema.ts +119 -32
- package/models/tools/presentation/slide.schema.ts +47 -0
- package/models/user-referrals.schema.ts +0 -6
- package/package.json +1 -1
|
@@ -16,6 +16,16 @@ export const PRESENTATION_ROUTES = {
|
|
|
16
16
|
UPDATE_PRESENTATION_OUTLINE: (uuid: string) => `${uuid}/outline`,
|
|
17
17
|
UPDATE_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
|
|
18
18
|
`${presentationId}/outline/${slideOutlineId}`,
|
|
19
|
+
UPDATE_PRESENTATION_SLIDES: (uuid: string) => `${uuid}/slides`,
|
|
20
|
+
GENERATE_AND_INSERT_SLIDE: (uuid: string) => `${uuid}/slides/generate-and-insert`,
|
|
21
|
+
BUILD_BLANK_SLIDE: 'slides/blank',
|
|
22
|
+
UPDATE_SLIDE_IMAGE_SLOT: (presentationId: string, slideId: string, slotId: string) =>
|
|
23
|
+
`${presentationId}/slides/${slideId}/image-slots/${slotId}`,
|
|
24
|
+
UPDATE_SLIDE: (presentationId: string, slideId: string) =>
|
|
25
|
+
`${presentationId}/slides/${slideId}`,
|
|
26
|
+
PARAPHRASE: (presentationId: string, slideId: string) =>
|
|
27
|
+
`${presentationId}/slides/${slideId}/paraphrase`,
|
|
28
|
+
GENERATE_REPORT: (presentationId: string) => `${presentationId}/generate-report`,
|
|
19
29
|
REPOSITION_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
|
|
20
30
|
`${presentationId}/outline/${slideOutlineId}/move`,
|
|
21
31
|
DELETE_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
|
|
@@ -17,6 +17,13 @@ exports.PRESENTATION_ROUTES = {
|
|
|
17
17
|
GENERATE_SLIDES: (uuid) => `${uuid}/slides/generate`,
|
|
18
18
|
UPDATE_PRESENTATION_OUTLINE: (uuid) => `${uuid}/outline`,
|
|
19
19
|
UPDATE_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${presentationId}/outline/${slideOutlineId}`,
|
|
20
|
+
UPDATE_PRESENTATION_SLIDES: (uuid) => `${uuid}/slides`,
|
|
21
|
+
GENERATE_AND_INSERT_SLIDE: (uuid) => `${uuid}/slides/generate-and-insert`,
|
|
22
|
+
BUILD_BLANK_SLIDE: 'slides/blank',
|
|
23
|
+
UPDATE_SLIDE_IMAGE_SLOT: (presentationId, slideId, slotId) => `${presentationId}/slides/${slideId}/image-slots/${slotId}`,
|
|
24
|
+
UPDATE_SLIDE: (presentationId, slideId) => `${presentationId}/slides/${slideId}`,
|
|
25
|
+
PARAPHRASE: (presentationId, slideId) => `${presentationId}/slides/${slideId}/paraphrase`,
|
|
26
|
+
GENERATE_REPORT: (presentationId) => `${presentationId}/generate-report`,
|
|
20
27
|
REPOSITION_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${presentationId}/outline/${slideOutlineId}/move`,
|
|
21
28
|
DELETE_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${presentationId}/outline/${slideOutlineId}`,
|
|
22
29
|
CREATE_SLIDE_OUTLINE: (presentationId) => `${presentationId}/outline`,
|
|
@@ -8,25 +8,8 @@ var RegisterUserCommand;
|
|
|
8
8
|
RegisterUserCommand.RequestSchema = models_1.UserSchema.pick({ email: true, password: true })
|
|
9
9
|
.extend({
|
|
10
10
|
utm: models_1.UtmSchema.optional(),
|
|
11
|
-
marketingConsent: zod_1.z.boolean().default(false),
|
|
12
11
|
})
|
|
13
|
-
.merge(models_1.UserReferralsSchema)
|
|
14
|
-
.refine((data) => {
|
|
15
|
-
const hasAdmitadUid = !!data.admitadUid;
|
|
16
|
-
const hasAdmitadClickDate = !!data.admitadClickDate;
|
|
17
|
-
return hasAdmitadUid === hasAdmitadClickDate;
|
|
18
|
-
}, {
|
|
19
|
-
message: 'admitadUid and admitadClickDate must be provided together',
|
|
20
|
-
path: ['admitadUid'],
|
|
21
|
-
})
|
|
22
|
-
.refine((data) => {
|
|
23
|
-
if (!data.admitadClickDate)
|
|
24
|
-
return true;
|
|
25
|
-
return new Date(data.admitadClickDate).getTime() <= Date.now();
|
|
26
|
-
}, {
|
|
27
|
-
message: 'admitadClickDate cannot be in the future',
|
|
28
|
-
path: ['admitadClickDate'],
|
|
29
|
-
});
|
|
12
|
+
.merge(models_1.UserReferralsSchema);
|
|
30
13
|
RegisterUserCommand.ResponseSchema = zod_1.z.object({
|
|
31
14
|
data: zod_1.z.object({
|
|
32
15
|
accessToken: zod_1.z.string(),
|
|
@@ -11,25 +11,8 @@ var VKLoginCommand;
|
|
|
11
11
|
code_verifier: zod_1.z.string(),
|
|
12
12
|
device_id: zod_1.z.string(),
|
|
13
13
|
state: zod_1.z.string(),
|
|
14
|
-
marketingConsent: zod_1.z.boolean().default(false),
|
|
15
14
|
})
|
|
16
|
-
.merge(models_1.UserReferralsSchema)
|
|
17
|
-
.refine((data) => {
|
|
18
|
-
const hasAdmitadUid = !!data.admitadUid;
|
|
19
|
-
const hasAdmitadClickDate = !!data.admitadClickDate;
|
|
20
|
-
return hasAdmitadUid === hasAdmitadClickDate;
|
|
21
|
-
}, {
|
|
22
|
-
message: 'admitadUid and admitadClickDate must be provided together',
|
|
23
|
-
path: ['admitadUid'],
|
|
24
|
-
})
|
|
25
|
-
.refine((data) => {
|
|
26
|
-
if (!data.admitadClickDate)
|
|
27
|
-
return true;
|
|
28
|
-
return new Date(data.admitadClickDate).getTime() <= Date.now();
|
|
29
|
-
}, {
|
|
30
|
-
message: 'admitadClickDate cannot be in the future',
|
|
31
|
-
path: ['admitadClickDate'],
|
|
32
|
-
});
|
|
15
|
+
.merge(models_1.UserReferralsSchema);
|
|
33
16
|
VKLoginCommand.ResponseSchema = zod_1.z.object({
|
|
34
17
|
data: zod_1.z.object({
|
|
35
18
|
accessToken: zod_1.z.string(),
|
|
@@ -9,25 +9,8 @@ var YandexLoginCommand;
|
|
|
9
9
|
.object({
|
|
10
10
|
code: zod_1.z.string(),
|
|
11
11
|
code_verifier: zod_1.z.string(),
|
|
12
|
-
marketingConsent: zod_1.z.boolean().default(false),
|
|
13
12
|
})
|
|
14
|
-
.merge(models_1.UserReferralsSchema)
|
|
15
|
-
.refine((data) => {
|
|
16
|
-
const hasAdmitadUid = !!data.admitadUid;
|
|
17
|
-
const hasAdmitadClickDate = !!data.admitadClickDate;
|
|
18
|
-
return hasAdmitadUid === hasAdmitadClickDate;
|
|
19
|
-
}, {
|
|
20
|
-
message: 'admitadUid and admitadClickDate must be provided together',
|
|
21
|
-
path: ['admitadUid'],
|
|
22
|
-
})
|
|
23
|
-
.refine((data) => {
|
|
24
|
-
if (!data.admitadClickDate)
|
|
25
|
-
return true;
|
|
26
|
-
return new Date(data.admitadClickDate).getTime() <= Date.now();
|
|
27
|
-
}, {
|
|
28
|
-
message: 'admitadClickDate cannot be in the future',
|
|
29
|
-
path: ['admitadClickDate'],
|
|
30
|
-
});
|
|
13
|
+
.merge(models_1.UserReferralsSchema);
|
|
31
14
|
YandexLoginCommand.ResponseSchema = zod_1.z.object({
|
|
32
15
|
data: zod_1.z.object({
|
|
33
16
|
accessToken: zod_1.z.string(),
|
|
@@ -26,8 +26,7 @@ var BuyProductCommand;
|
|
|
26
26
|
electronic: zod_1.z.number(),
|
|
27
27
|
}),
|
|
28
28
|
});
|
|
29
|
-
BuyProductCommand.RequestFastSchema = zod_1.z
|
|
30
|
-
.object({
|
|
29
|
+
BuyProductCommand.RequestFastSchema = zod_1.z.object({
|
|
31
30
|
email: zod_1.z.string().email(),
|
|
32
31
|
partnerId: zod_1.z.string().uuid().optional(),
|
|
33
32
|
promocode: zod_1.z.string().optional(),
|
|
@@ -35,29 +34,6 @@ var BuyProductCommand;
|
|
|
35
34
|
webmasterReferralProvidedAt: zod_1.z
|
|
36
35
|
.preprocess((val) => (typeof val === 'string' ? new Date(val) : val), zod_1.z.date())
|
|
37
36
|
.optional(),
|
|
38
|
-
admitadUid: zod_1.z.string().optional(),
|
|
39
|
-
admitadClickDate: zod_1.z
|
|
40
|
-
.string()
|
|
41
|
-
.datetime()
|
|
42
|
-
.transform((date) => new Date(date))
|
|
43
|
-
.optional(),
|
|
44
|
-
marketingConsent: zod_1.z.boolean().default(false),
|
|
45
|
-
})
|
|
46
|
-
.refine((data) => {
|
|
47
|
-
const hasAdmitadUid = !!data.admitadUid;
|
|
48
|
-
const hasAdmitadClickDate = !!data.admitadClickDate;
|
|
49
|
-
return hasAdmitadUid === hasAdmitadClickDate;
|
|
50
|
-
}, {
|
|
51
|
-
message: 'admitadUid and admitadClickDate must be provided together',
|
|
52
|
-
path: ['admitadUid'],
|
|
53
|
-
})
|
|
54
|
-
.refine((data) => {
|
|
55
|
-
if (!data.admitadClickDate)
|
|
56
|
-
return true;
|
|
57
|
-
return new Date(data.admitadClickDate).getTime() <= Date.now();
|
|
58
|
-
}, {
|
|
59
|
-
message: 'admitadClickDate cannot be in the future',
|
|
60
|
-
path: ['admitadClickDate'],
|
|
61
37
|
});
|
|
62
38
|
BuyProductCommand.ResponseSchema = zod_1.z.object({
|
|
63
39
|
publicId: zod_1.z.string(),
|
|
@@ -12,8 +12,7 @@ var BuySubscriptionCommand;
|
|
|
12
12
|
useDiscount: zod_1.z.boolean(),
|
|
13
13
|
promocode: zod_1.z.string().optional(),
|
|
14
14
|
});
|
|
15
|
-
BuySubscriptionCommand.RequestFastSchema = zod_1.z
|
|
16
|
-
.object({
|
|
15
|
+
BuySubscriptionCommand.RequestFastSchema = zod_1.z.object({
|
|
17
16
|
email: zod_1.z.string().email(),
|
|
18
17
|
partnerId: zod_1.z.string().uuid().optional(),
|
|
19
18
|
promocode: zod_1.z.string().optional(),
|
|
@@ -21,29 +20,6 @@ var BuySubscriptionCommand;
|
|
|
21
20
|
webmasterReferralProvidedAt: zod_1.z
|
|
22
21
|
.preprocess((val) => (typeof val === 'string' ? new Date(val) : val), zod_1.z.date())
|
|
23
22
|
.optional(),
|
|
24
|
-
admitadUid: zod_1.z.string().optional(),
|
|
25
|
-
admitadClickDate: zod_1.z
|
|
26
|
-
.string()
|
|
27
|
-
.datetime()
|
|
28
|
-
.transform((date) => new Date(date))
|
|
29
|
-
.optional(),
|
|
30
|
-
marketingConsent: zod_1.z.boolean().default(false),
|
|
31
|
-
})
|
|
32
|
-
.refine((data) => {
|
|
33
|
-
const hasAdmitadUid = !!data.admitadUid;
|
|
34
|
-
const hasAdmitadClickDate = !!data.admitadClickDate;
|
|
35
|
-
return hasAdmitadUid === hasAdmitadClickDate;
|
|
36
|
-
}, {
|
|
37
|
-
message: 'admitadUid and admitadClickDate must be provided together',
|
|
38
|
-
path: ['admitadUid'],
|
|
39
|
-
})
|
|
40
|
-
.refine((data) => {
|
|
41
|
-
if (!data.admitadClickDate)
|
|
42
|
-
return true;
|
|
43
|
-
return new Date(data.admitadClickDate).getTime() <= Date.now();
|
|
44
|
-
}, {
|
|
45
|
-
message: 'admitadClickDate cannot be in the future',
|
|
46
|
-
path: ['admitadClickDate'],
|
|
47
23
|
});
|
|
48
24
|
const IReceiptOrderSchema = zod_1.z.object({
|
|
49
25
|
items: zod_1.z.array(zod_1.z.object({
|
|
@@ -5,25 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
var CreateTelegramAuthLinkCommand;
|
|
7
7
|
(function (CreateTelegramAuthLinkCommand) {
|
|
8
|
-
CreateTelegramAuthLinkCommand.RequestSchema = models_1.UserReferralsSchema
|
|
9
|
-
marketingConsent: zod_1.z.boolean().default(false),
|
|
10
|
-
})
|
|
11
|
-
.refine((data) => {
|
|
12
|
-
const hasAdmitadUid = !!data.admitadUid;
|
|
13
|
-
const hasAdmitadClickDate = !!data.admitadClickDate;
|
|
14
|
-
return hasAdmitadUid === hasAdmitadClickDate;
|
|
15
|
-
}, {
|
|
16
|
-
message: 'admitadUid and admitadClickDate must be provided together',
|
|
17
|
-
path: ['admitadUid'],
|
|
18
|
-
})
|
|
19
|
-
.refine((data) => {
|
|
20
|
-
if (!data.admitadClickDate)
|
|
21
|
-
return true;
|
|
22
|
-
return new Date(data.admitadClickDate).getTime() <= Date.now();
|
|
23
|
-
}, {
|
|
24
|
-
message: 'admitadClickDate cannot be in the future',
|
|
25
|
-
path: ['admitadClickDate'],
|
|
26
|
-
});
|
|
8
|
+
CreateTelegramAuthLinkCommand.RequestSchema = models_1.UserReferralsSchema;
|
|
27
9
|
CreateTelegramAuthLinkCommand.ResponseSchema = zod_1.z.object({
|
|
28
10
|
data: zod_1.z.object({
|
|
29
11
|
uuid: zod_1.z.string().uuid(),
|
|
@@ -14,13 +14,6 @@ var AuthWithTelegramWebAppCommand;
|
|
|
14
14
|
.preprocess((val) => (typeof val === 'string' ? new Date(val) : val), zod_1.z.date())
|
|
15
15
|
.optional(),
|
|
16
16
|
utm: models_1.UtmSchema.optional(),
|
|
17
|
-
admitadUid: zod_1.z.string().optional(),
|
|
18
|
-
admitadClickDate: zod_1.z
|
|
19
|
-
.string()
|
|
20
|
-
.datetime()
|
|
21
|
-
.transform((date) => new Date(date))
|
|
22
|
-
.optional(),
|
|
23
|
-
marketingConsent: zod_1.z.boolean().default(false),
|
|
24
17
|
});
|
|
25
18
|
AuthWithTelegramWebAppCommand.ResponseSchema = zod_1.z.object({
|
|
26
19
|
data: zod_1.z.object({
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BuildBlankSlideCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var BuildBlankSlideCommand;
|
|
6
|
+
(function (BuildBlankSlideCommand) {
|
|
7
|
+
BuildBlankSlideCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
slideContentType: zod_1.z.string(),
|
|
9
|
+
});
|
|
10
|
+
BuildBlankSlideCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.object({
|
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
|
13
|
+
order: zod_1.z.number(),
|
|
14
|
+
contentTypeId: zod_1.z.string(),
|
|
15
|
+
layoutId: zod_1.z.string(),
|
|
16
|
+
content: zod_1.z.record(zod_1.z.any()),
|
|
17
|
+
createdAt: zod_1.z.date(),
|
|
18
|
+
updatedAt: zod_1.z.date(),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
})(BuildBlankSlideCommand || (exports.BuildBlankSlideCommand = BuildBlankSlideCommand = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenerateAndInsertSlideCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const presentation_1 = require("../../../models/tools/presentation");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var GenerateAndInsertSlideCommand;
|
|
8
|
+
(function (GenerateAndInsertSlideCommand) {
|
|
9
|
+
GenerateAndInsertSlideCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
contentTypeId: zod_1.z.nativeEnum(constants_1.SLIDE_CONTENT_TYPE),
|
|
11
|
+
prompt: zod_1.z.string().max(10000).optional(),
|
|
12
|
+
title: zod_1.z.string().min(1).max(80),
|
|
13
|
+
position: zod_1.z.number().min(0),
|
|
14
|
+
layoutId: zod_1.z.nativeEnum(constants_1.SLIDE_LAYOUT).optional(),
|
|
15
|
+
});
|
|
16
|
+
GenerateAndInsertSlideCommand.RequestParamsSchema = zod_1.z.object({
|
|
17
|
+
uuid: zod_1.z.string().uuid(),
|
|
18
|
+
});
|
|
19
|
+
GenerateAndInsertSlideCommand.ResponseSchema = zod_1.z.object({
|
|
20
|
+
data: zod_1.z.array(presentation_1.SlideSchema),
|
|
21
|
+
});
|
|
22
|
+
})(GenerateAndInsertSlideCommand || (exports.GenerateAndInsertSlideCommand = GenerateAndInsertSlideCommand = {}));
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./build-blank-slide.command"), exports);
|
|
17
18
|
__exportStar(require("./create-presentation.command"), exports);
|
|
18
19
|
__exportStar(require("./delete-all-user-presentations.command"), exports);
|
|
19
20
|
__exportStar(require("./delete-slide-outline.command"), exports);
|
|
@@ -23,9 +24,15 @@ __exportStar(require("./find-presentation-by-uuid.command"), exports);
|
|
|
23
24
|
__exportStar(require("./find-presentation-outline.command"), exports);
|
|
24
25
|
__exportStar(require("./find-presentations.command"), exports);
|
|
25
26
|
__exportStar(require("./generate-presentation-slides.command"), exports);
|
|
27
|
+
__exportStar(require("./generate-and-insert-slide.command"), exports);
|
|
26
28
|
__exportStar(require("./get-presentation-config.command"), exports);
|
|
27
29
|
__exportStar(require("./reposition-slide-outline.command"), exports);
|
|
28
30
|
__exportStar(require("./update-slide-outline.command"), exports);
|
|
29
31
|
__exportStar(require("./update-presentation-outline.command"), exports);
|
|
30
32
|
__exportStar(require("./update-presentation.command"), exports);
|
|
33
|
+
__exportStar(require("./update-presentation-slides.command"), exports);
|
|
34
|
+
__exportStar(require("./update-slide-image-slot.command"), exports);
|
|
31
35
|
__exportStar(require("./update-slide-outline.command"), exports);
|
|
36
|
+
__exportStar(require("./presentation-paraphrase.command"), exports);
|
|
37
|
+
__exportStar(require("./presentation-generate-report.command"), exports);
|
|
38
|
+
__exportStar(require("./update-slide.command"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresentationGenerateReportCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var PresentationGenerateReportCommand;
|
|
6
|
+
(function (PresentationGenerateReportCommand) {
|
|
7
|
+
PresentationGenerateReportCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
presentationId: zod_1.z.string(),
|
|
9
|
+
});
|
|
10
|
+
PresentationGenerateReportCommand.RequestSchema = PresentationGenerateReportCommand.RequestParamsSchema;
|
|
11
|
+
PresentationGenerateReportCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: zod_1.z.object({
|
|
13
|
+
output: zod_1.z.string(),
|
|
14
|
+
docxUrl: zod_1.z.string(),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
})(PresentationGenerateReportCommand || (exports.PresentationGenerateReportCommand = PresentationGenerateReportCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresentationParaphraseCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var PresentationParaphraseCommand;
|
|
6
|
+
(function (PresentationParaphraseCommand) {
|
|
7
|
+
PresentationParaphraseCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
presentationId: zod_1.z.string(),
|
|
9
|
+
slideId: zod_1.z.string(),
|
|
10
|
+
});
|
|
11
|
+
PresentationParaphraseCommand.RequestBodySchema = zod_1.z.object({
|
|
12
|
+
selectionText: zod_1.z.string().max(10000),
|
|
13
|
+
});
|
|
14
|
+
PresentationParaphraseCommand.RequestSchema = PresentationParaphraseCommand.RequestParamsSchema.merge(PresentationParaphraseCommand.RequestBodySchema);
|
|
15
|
+
PresentationParaphraseCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
data: zod_1.z.object({
|
|
17
|
+
output: zod_1.z.string(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(PresentationParaphraseCommand || (exports.PresentationParaphraseCommand = PresentationParaphraseCommand = {}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdatePresentationSlidesCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const presentation_1 = require("../../../models/tools/presentation");
|
|
6
|
+
var UpdatePresentationSlidesCommand;
|
|
7
|
+
(function (UpdatePresentationSlidesCommand) {
|
|
8
|
+
UpdatePresentationSlidesCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
data: presentation_1.SlideBulkUpdateSchema,
|
|
10
|
+
});
|
|
11
|
+
UpdatePresentationSlidesCommand.RequestParamsSchema = zod_1.z.object({
|
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
|
13
|
+
});
|
|
14
|
+
UpdatePresentationSlidesCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: zod_1.z.array(zod_1.z.object({
|
|
16
|
+
uuid: zod_1.z.string().uuid(),
|
|
17
|
+
order: zod_1.z.number(),
|
|
18
|
+
contentTypeId: zod_1.z.string(),
|
|
19
|
+
layoutId: zod_1.z.string(),
|
|
20
|
+
content: zod_1.z.record(zod_1.z.any()),
|
|
21
|
+
createdAt: zod_1.z.date(),
|
|
22
|
+
updatedAt: zod_1.z.date(),
|
|
23
|
+
})),
|
|
24
|
+
});
|
|
25
|
+
})(UpdatePresentationSlidesCommand || (exports.UpdatePresentationSlidesCommand = UpdatePresentationSlidesCommand = {}));
|
|
@@ -8,9 +8,10 @@ var UpdatePresentationCommand;
|
|
|
8
8
|
UpdatePresentationCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
9
|
uuid: zod_1.z.string().uuid(),
|
|
10
10
|
});
|
|
11
|
-
UpdatePresentationCommand.RequestBodySchema =
|
|
12
|
-
title:
|
|
13
|
-
|
|
11
|
+
UpdatePresentationCommand.RequestBodySchema = presentation_1.PresentationSchema.pick({
|
|
12
|
+
title: true,
|
|
13
|
+
templateId: true,
|
|
14
|
+
}).partial();
|
|
14
15
|
UpdatePresentationCommand.ResponseSchema = zod_1.z.object({
|
|
15
16
|
data: presentation_1.PresentationSchema,
|
|
16
17
|
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateSlideImageSlotCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const slide_image_slot_schema_1 = require("../../../models/tools/presentation/slide-image-slot.schema");
|
|
7
|
+
var UpdateSlideImageSlotCommand;
|
|
8
|
+
(function (UpdateSlideImageSlotCommand) {
|
|
9
|
+
const ReplacePayload = zod_1.z.object({
|
|
10
|
+
action: zod_1.z.literal(constants_1.SLIDE_IMAGE_SLOT_ACTION.REPLACE),
|
|
11
|
+
fileId: zod_1.z.string().uuid(),
|
|
12
|
+
});
|
|
13
|
+
const GeneratePayload = zod_1.z.object({
|
|
14
|
+
action: zod_1.z.literal(constants_1.SLIDE_IMAGE_SLOT_ACTION.GENERATE),
|
|
15
|
+
prompt: zod_1.z.string().min(1).max(1000).optional(),
|
|
16
|
+
});
|
|
17
|
+
const UpdateImageSlotPayloadSchema = zod_1.z.discriminatedUnion('action', [
|
|
18
|
+
ReplacePayload,
|
|
19
|
+
GeneratePayload,
|
|
20
|
+
]);
|
|
21
|
+
UpdateSlideImageSlotCommand.RequestSchema = zod_1.z.object({
|
|
22
|
+
payload: UpdateImageSlotPayloadSchema,
|
|
23
|
+
});
|
|
24
|
+
UpdateSlideImageSlotCommand.RequestParamsSchema = zod_1.z.object({
|
|
25
|
+
presentationId: zod_1.z.string().uuid(),
|
|
26
|
+
slideId: zod_1.z.string().uuid(),
|
|
27
|
+
slotId: zod_1.z.string().uuid().optional(),
|
|
28
|
+
});
|
|
29
|
+
UpdateSlideImageSlotCommand.ResponseSchema = zod_1.z.object({
|
|
30
|
+
data: zod_1.z.object({
|
|
31
|
+
imageSlot: slide_image_slot_schema_1.SlideImageSlotSchema,
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
34
|
+
})(UpdateSlideImageSlotCommand || (exports.UpdateSlideImageSlotCommand = UpdateSlideImageSlotCommand = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateSlideCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const presentation_1 = require("../../../models/tools/presentation");
|
|
6
|
+
var UpdateSlideCommand;
|
|
7
|
+
(function (UpdateSlideCommand) {
|
|
8
|
+
UpdateSlideCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
|
+
presentationId: zod_1.z.string(),
|
|
10
|
+
slideId: zod_1.z.string(),
|
|
11
|
+
});
|
|
12
|
+
UpdateSlideCommand.RequestBodySchema = zod_1.z.object({
|
|
13
|
+
data: presentation_1.SlideUpdateSchema,
|
|
14
|
+
});
|
|
15
|
+
UpdateSlideCommand.RequestSchema = UpdateSlideCommand.RequestParamsSchema.merge(UpdateSlideCommand.RequestBodySchema);
|
|
16
|
+
UpdateSlideCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
+
data: presentation_1.SlideSchema,
|
|
18
|
+
});
|
|
19
|
+
})(UpdateSlideCommand || (exports.UpdateSlideCommand = UpdateSlideCommand = {}));
|
|
@@ -2239,12 +2239,10 @@ exports.ERRORS = {
|
|
|
2239
2239
|
MUSIC_MAX_SYMBOLS_EXCEEDED: {
|
|
2240
2240
|
code: 'A458',
|
|
2241
2241
|
message: 'Превышена максимальная количество символов',
|
|
2242
|
-
httpCode: 400,
|
|
2243
2242
|
},
|
|
2244
2243
|
MUSIC_INVALID_VOCAL: {
|
|
2245
2244
|
code: 'A459',
|
|
2246
2245
|
message: 'Выбран неверный голос для вокала',
|
|
2247
|
-
httpCode: 400,
|
|
2248
2246
|
},
|
|
2249
2247
|
MUSIC_JOB_DELETE_ERROR: {
|
|
2250
2248
|
code: 'A460',
|
|
@@ -2286,4 +2284,14 @@ exports.ERRORS = {
|
|
|
2286
2284
|
message: 'Не удалось применить бонусы вебмастеру',
|
|
2287
2285
|
httpCode: 500,
|
|
2288
2286
|
},
|
|
2287
|
+
SLIDE_IMAGE_SLOT_UPDATE_ERROR: {
|
|
2288
|
+
code: 'A450',
|
|
2289
|
+
message: 'Произошла ошибка при обновлении изображения на слайде',
|
|
2290
|
+
httpCode: 500,
|
|
2291
|
+
},
|
|
2292
|
+
FILE_TYPE_NOT_SUPPORTED: {
|
|
2293
|
+
code: 'A451',
|
|
2294
|
+
message: 'Неподдерживаемый тип файла',
|
|
2295
|
+
httpCode: 400,
|
|
2296
|
+
},
|
|
2289
2297
|
};
|
|
@@ -19,3 +19,7 @@ __exportStar(require("./slide-content-type.enum"), exports);
|
|
|
19
19
|
__exportStar(require("./slide-icon-slot-status.enum"), exports);
|
|
20
20
|
__exportStar(require("./slide-image-slot.status.enum"), exports);
|
|
21
21
|
__exportStar(require("./slide-layout.enum"), exports);
|
|
22
|
+
__exportStar(require("./slide-image-slot-action.enum"), exports);
|
|
23
|
+
__exportStar(require("./presentation-ai-action-type.enum"), exports);
|
|
24
|
+
__exportStar(require("./presentation-ai-action-pricing-type.enum"), exports);
|
|
25
|
+
__exportStar(require("./presentation-ai-action-call-status.enum"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PRESENTATION_AI_ACTION_CALL_STATUS = void 0;
|
|
4
|
+
var PRESENTATION_AI_ACTION_CALL_STATUS;
|
|
5
|
+
(function (PRESENTATION_AI_ACTION_CALL_STATUS) {
|
|
6
|
+
PRESENTATION_AI_ACTION_CALL_STATUS["PROCESSING"] = "processing";
|
|
7
|
+
PRESENTATION_AI_ACTION_CALL_STATUS["COMPLETED"] = "completed";
|
|
8
|
+
PRESENTATION_AI_ACTION_CALL_STATUS["FAILED"] = "failed";
|
|
9
|
+
})(PRESENTATION_AI_ACTION_CALL_STATUS || (exports.PRESENTATION_AI_ACTION_CALL_STATUS = PRESENTATION_AI_ACTION_CALL_STATUS = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PRESENTATION_AI_ACTION_PRICING_TYPE = void 0;
|
|
4
|
+
var PRESENTATION_AI_ACTION_PRICING_TYPE;
|
|
5
|
+
(function (PRESENTATION_AI_ACTION_PRICING_TYPE) {
|
|
6
|
+
PRESENTATION_AI_ACTION_PRICING_TYPE["PER_CHARACTER"] = "PER_CHARACTER";
|
|
7
|
+
PRESENTATION_AI_ACTION_PRICING_TYPE["FLAT"] = "FLAT";
|
|
8
|
+
})(PRESENTATION_AI_ACTION_PRICING_TYPE || (exports.PRESENTATION_AI_ACTION_PRICING_TYPE = PRESENTATION_AI_ACTION_PRICING_TYPE = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PRESENTATION_AI_ACTION_TYPE = void 0;
|
|
4
|
+
var PRESENTATION_AI_ACTION_TYPE;
|
|
5
|
+
(function (PRESENTATION_AI_ACTION_TYPE) {
|
|
6
|
+
PRESENTATION_AI_ACTION_TYPE["PARAPHRASE"] = "PARAPHRASE";
|
|
7
|
+
PRESENTATION_AI_ACTION_TYPE["GENERATE_REPORT"] = "GENERATE_REPORT";
|
|
8
|
+
})(PRESENTATION_AI_ACTION_TYPE || (exports.PRESENTATION_AI_ACTION_TYPE = PRESENTATION_AI_ACTION_TYPE = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SLIDE_IMAGE_SLOT_ACTION = void 0;
|
|
4
|
+
var SLIDE_IMAGE_SLOT_ACTION;
|
|
5
|
+
(function (SLIDE_IMAGE_SLOT_ACTION) {
|
|
6
|
+
SLIDE_IMAGE_SLOT_ACTION["REPLACE"] = "REPLACE";
|
|
7
|
+
SLIDE_IMAGE_SLOT_ACTION["GENERATE"] = "GENERATE";
|
|
8
|
+
})(SLIDE_IMAGE_SLOT_ACTION || (exports.SLIDE_IMAGE_SLOT_ACTION = SLIDE_IMAGE_SLOT_ACTION = {}));
|
|
@@ -5,4 +5,5 @@ var ORGANIZATION_TYPE;
|
|
|
5
5
|
(function (ORGANIZATION_TYPE) {
|
|
6
6
|
ORGANIZATION_TYPE["INDIVIDUAL_ENTREPRENEUR"] = "\u0418\u041F";
|
|
7
7
|
ORGANIZATION_TYPE["LEGAL_ENTITY"] = "\u042E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u043B\u0438\u0446\u043E";
|
|
8
|
+
ORGANIZATION_TYPE["SELF_EMPLOYED"] = "\u0421\u0430\u043C\u043E\u0437\u0430\u043D\u044F\u0442\u044B\u0439";
|
|
8
9
|
})(ORGANIZATION_TYPE || (exports.ORGANIZATION_TYPE = ORGANIZATION_TYPE = {}));
|
package/build/helpers/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ai-model"), exports);
|
|
18
|
+
__exportStar(require("./presentation"), exports);
|
|
18
19
|
__exportStar(require("./stt"), exports);
|
|
19
20
|
__exportStar(require("./subscription"), exports);
|
|
20
21
|
__exportStar(require("./tts"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculatePresentationAiActionPrice = calculatePresentationAiActionPrice;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
function calculatePresentationAiActionPrice(pricingRules, selectionText) {
|
|
6
|
+
switch (pricingRules.type) {
|
|
7
|
+
case constants_1.PRESENTATION_AI_ACTION_PRICING_TYPE.PER_CHARACTER:
|
|
8
|
+
const characterCount = selectionText.length;
|
|
9
|
+
const price = characterCount * pricingRules.price;
|
|
10
|
+
return Math.max(1, Math.ceil(price));
|
|
11
|
+
case constants_1.PRESENTATION_AI_ACTION_PRICING_TYPE.FLAT:
|
|
12
|
+
return Math.max(1, Math.ceil(pricingRules.price));
|
|
13
|
+
default:
|
|
14
|
+
throw new Error(`Unknown pricing type`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./calculate-presentation-ai-action-price.util"), exports);
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./language"), exports);
|
|
18
18
|
__exportStar(require("./paraphrase"), exports);
|
|
19
|
+
__exportStar(require("./presentation"), exports);
|
|
19
20
|
__exportStar(require("./stt"), exports);
|
|
20
21
|
__exportStar(require("./tts"), exports);
|
|
21
22
|
__exportStar(require("./video"), exports);
|
|
@@ -21,3 +21,4 @@ __exportStar(require("./slide-outline.schema"), exports);
|
|
|
21
21
|
__exportStar(require("./slide.schema"), exports);
|
|
22
22
|
__exportStar(require("./slide-content.schema"), exports);
|
|
23
23
|
__exportStar(require("./presentation-config.schema"), exports);
|
|
24
|
+
__exportStar(require("./presentation-ai-action.schema"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresentationAiActionSchema = exports.PresentationAiActionPricingRulesSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
exports.PresentationAiActionPricingRulesSchema = zod_1.z.discriminatedUnion('type', [
|
|
7
|
+
zod_1.z.object({
|
|
8
|
+
type: zod_1.z.literal(constants_1.PRESENTATION_AI_ACTION_PRICING_TYPE.PER_CHARACTER),
|
|
9
|
+
price: zod_1.z.number(),
|
|
10
|
+
}),
|
|
11
|
+
zod_1.z.object({
|
|
12
|
+
type: zod_1.z.literal(constants_1.PRESENTATION_AI_ACTION_PRICING_TYPE.FLAT),
|
|
13
|
+
price: zod_1.z.number(),
|
|
14
|
+
}),
|
|
15
|
+
]);
|
|
16
|
+
exports.PresentationAiActionSchema = zod_1.z.object({
|
|
17
|
+
uuid: zod_1.z.string(),
|
|
18
|
+
type: zod_1.z.nativeEnum(constants_1.PRESENTATION_AI_ACTION_TYPE),
|
|
19
|
+
pricingRules: exports.PresentationAiActionPricingRulesSchema,
|
|
20
|
+
maxPromptLength: zod_1.z.number(),
|
|
21
|
+
aiModel: zod_1.z.string(),
|
|
22
|
+
title: zod_1.z.string(),
|
|
23
|
+
icon: zod_1.z.string(),
|
|
24
|
+
order: zod_1.z.number(),
|
|
25
|
+
createdAt: zod_1.z.date(),
|
|
26
|
+
updatedAt: zod_1.z.date(),
|
|
27
|
+
});
|
|
@@ -5,14 +5,17 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const slide_content_type_schema_1 = require("./slide-content-type.schema");
|
|
6
6
|
const language_1 = require("../language");
|
|
7
7
|
const presentation_template_schema_1 = require("./presentation-template.schema");
|
|
8
|
+
const presentation_ai_action_schema_1 = require("./presentation-ai-action.schema");
|
|
8
9
|
exports.PresentationConfigSchema = zod_1.z.object({
|
|
9
10
|
slideContentTypes: zod_1.z.array(slide_content_type_schema_1.SlideContentTypeSchema),
|
|
10
11
|
languages: zod_1.z.array(language_1.LanguageSchema),
|
|
11
12
|
templates: zod_1.z.array(presentation_template_schema_1.PresentationTemplateSchema),
|
|
13
|
+
aiActions: zod_1.z.array(presentation_ai_action_schema_1.PresentationAiActionSchema),
|
|
12
14
|
slideGenerationPrice: zod_1.z.number(),
|
|
13
15
|
maxSlides: zod_1.z.number(),
|
|
14
16
|
minSlides: zod_1.z.number(),
|
|
15
17
|
maxSlideTitleLength: zod_1.z.number(),
|
|
16
18
|
maxSlideOutlineLength: zod_1.z.number(),
|
|
17
19
|
maxPromptLength: zod_1.z.number(),
|
|
20
|
+
imageGenerationPrice: zod_1.z.number(),
|
|
18
21
|
});
|