@purpleschool/gptbot 0.7.78 → 0.7.79
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 +0 -10
- package/build/api/controllers/http/presentation.js +0 -7
- package/build/commands/auth/register-user.command.js +18 -1
- package/build/commands/auth/vk-login.command.js +18 -1
- package/build/commands/auth/yandex-login.command.js +18 -1
- package/build/commands/product/buy-product.command.js +25 -1
- package/build/commands/subscription/buy-subscription.command.js +25 -1
- package/build/commands/telegram-auth/create-telegram-auth-link.command.js +19 -1
- package/build/commands/telegram-profile/auth-with-telegram-web-app.command.js +7 -0
- package/build/commands/tools/presentation/index.js +0 -7
- package/build/commands/tools/presentation/update-presentation.command.js +3 -4
- package/build/constants/errors/errors.js +6 -9
- package/build/constants/presentation/enums/index.js +0 -4
- package/build/constants/webmaster/enums/organization-type.enum.js +0 -1
- package/build/helpers/index.js +0 -1
- package/build/models/tools/index.js +0 -1
- package/build/models/tools/presentation/index.js +0 -1
- package/build/models/tools/presentation/presentation-config.schema.js +0 -3
- package/build/models/tools/presentation/presentation.schema.js +0 -2
- package/build/models/tools/presentation/slide-content.schema.js +20 -22
- package/build/models/tools/presentation/slide.schema.js +1 -39
- package/build/models/user-referrals.schema.js +6 -0
- package/commands/auth/register-user.command.ts +23 -1
- package/commands/auth/vk-login.command.ts +23 -1
- package/commands/auth/yandex-login.command.ts +23 -1
- package/commands/product/buy-product.command.ts +38 -9
- package/commands/subscription/buy-subscription.command.ts +38 -9
- package/commands/telegram-auth/create-telegram-auth-link.command.ts +24 -1
- package/commands/telegram-profile/auth-with-telegram-web-app.command.ts +7 -0
- package/commands/tools/presentation/index.ts +0 -7
- package/commands/tools/presentation/update-presentation.command.ts +4 -5
- package/constants/errors/errors.ts +6 -9
- package/constants/presentation/enums/index.ts +0 -4
- package/constants/webmaster/enums/organization-type.enum.ts +0 -1
- package/helpers/index.ts +0 -1
- package/models/tools/index.ts +0 -1
- package/models/tools/presentation/index.ts +0 -1
- package/models/tools/presentation/presentation-config.schema.ts +0 -3
- package/models/tools/presentation/presentation.schema.ts +0 -2
- package/models/tools/presentation/slide-content.schema.ts +32 -119
- package/models/tools/presentation/slide.schema.ts +0 -47
- package/models/user-referrals.schema.ts +6 -0
- package/package.json +1 -1
- package/build/commands/tools/presentation/build-blank-slide.command.js +0 -21
- package/build/commands/tools/presentation/generate-and-insert-slide.command.js +0 -22
- package/build/commands/tools/presentation/presentation-generate-report.command.js +0 -17
- package/build/commands/tools/presentation/presentation-paraphrase.command.js +0 -20
- package/build/commands/tools/presentation/update-presentation-slides.command.js +0 -25
- package/build/commands/tools/presentation/update-slide-image-slot.command.js +0 -34
- package/build/commands/tools/presentation/update-slide.command.js +0 -19
- package/build/constants/presentation/enums/presentation-ai-action-call-status.enum.js +0 -9
- package/build/constants/presentation/enums/presentation-ai-action-pricing-type.enum.js +0 -8
- package/build/constants/presentation/enums/presentation-ai-action-type.enum.js +0 -8
- package/build/constants/presentation/enums/slide-image-slot-action.enum.js +0 -8
- package/build/helpers/presentation/calculate-presentation-ai-action-price.util.js +0 -16
- package/build/helpers/presentation/index.js +0 -17
- package/build/models/tools/presentation/presentation-ai-action.schema.js +0 -27
- package/build/models/tools/presentation/slide-content-edit.schema.js +0 -129
- package/commands/tools/presentation/build-blank-slide.command.ts +0 -23
- package/commands/tools/presentation/generate-and-insert-slide.command.ts +0 -27
- package/commands/tools/presentation/presentation-generate-report.command.ts +0 -21
- package/commands/tools/presentation/presentation-paraphrase.command.ts +0 -26
- package/commands/tools/presentation/update-presentation-slides.command.ts +0 -32
- package/commands/tools/presentation/update-slide-image-slot.command.ts +0 -40
- package/commands/tools/presentation/update-slide.command.ts +0 -25
- package/constants/presentation/enums/presentation-ai-action-call-status.enum.ts +0 -5
- package/constants/presentation/enums/presentation-ai-action-pricing-type.enum.ts +0 -4
- package/constants/presentation/enums/presentation-ai-action-type.enum.ts +0 -4
- package/constants/presentation/enums/slide-image-slot-action.enum.ts +0 -4
- package/helpers/presentation/calculate-presentation-ai-action-price.util.ts +0 -20
- package/helpers/presentation/index.ts +0 -1
- package/models/tools/presentation/presentation-ai-action.schema.ts +0 -33
- package/models/tools/presentation/slide-content-edit.schema.ts +0 -154
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
PRESENTATION_AI_ACTION_PRICING_TYPE,
|
|
4
|
-
PRESENTATION_AI_ACTION_TYPE,
|
|
5
|
-
} from '../../../constants';
|
|
6
|
-
|
|
7
|
-
export const PresentationAiActionPricingRulesSchema = z.discriminatedUnion('type', [
|
|
8
|
-
z.object({
|
|
9
|
-
type: z.literal(PRESENTATION_AI_ACTION_PRICING_TYPE.PER_CHARACTER),
|
|
10
|
-
price: z.number(),
|
|
11
|
-
}),
|
|
12
|
-
z.object({
|
|
13
|
-
type: z.literal(PRESENTATION_AI_ACTION_PRICING_TYPE.FLAT),
|
|
14
|
-
price: z.number(),
|
|
15
|
-
}),
|
|
16
|
-
]);
|
|
17
|
-
export type PresentationAiActionPricingRules = z.infer<
|
|
18
|
-
typeof PresentationAiActionPricingRulesSchema
|
|
19
|
-
>;
|
|
20
|
-
|
|
21
|
-
export const PresentationAiActionSchema = z.object({
|
|
22
|
-
uuid: z.string(),
|
|
23
|
-
type: z.nativeEnum(PRESENTATION_AI_ACTION_TYPE),
|
|
24
|
-
pricingRules: PresentationAiActionPricingRulesSchema,
|
|
25
|
-
maxPromptLength: z.number(),
|
|
26
|
-
aiModel: z.string(),
|
|
27
|
-
title: z.string(),
|
|
28
|
-
icon: z.string(),
|
|
29
|
-
order: z.number(),
|
|
30
|
-
createdAt: z.date(),
|
|
31
|
-
updatedAt: z.date(),
|
|
32
|
-
});
|
|
33
|
-
export type PresentationAiAction = z.infer<typeof PresentationAiActionSchema>;
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import z from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
ICoverSlideDataStructure,
|
|
4
|
-
IThankYouSlideDataStructure,
|
|
5
|
-
ITextSlideDataStructure,
|
|
6
|
-
IStructuredListSlideDataStructure,
|
|
7
|
-
IContentsSlideDataStructure,
|
|
8
|
-
IImageSlideDataStructure,
|
|
9
|
-
ISectionBreakSlideDataStructure,
|
|
10
|
-
ITableSlideDataStructure,
|
|
11
|
-
SLIDE_CHART_TYPE,
|
|
12
|
-
IBarChartSlideDataStructure,
|
|
13
|
-
IChartSlideDataStructure,
|
|
14
|
-
ImageSlotSchema,
|
|
15
|
-
} from './slide-content.schema';
|
|
16
|
-
import { SLIDE_CONTENT_TYPE } from '../../../constants';
|
|
17
|
-
|
|
18
|
-
export const CoverSlideDataUserEditSchema = z.object({
|
|
19
|
-
contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
|
|
20
|
-
title: z.string().max(1000),
|
|
21
|
-
author: z.object({
|
|
22
|
-
label: z.string().max(200),
|
|
23
|
-
value: z.string().max(500),
|
|
24
|
-
}),
|
|
25
|
-
date: z.object({
|
|
26
|
-
label: z.string().max(200),
|
|
27
|
-
value: z.string().max(500),
|
|
28
|
-
}),
|
|
29
|
-
email: z.object({
|
|
30
|
-
label: z.string().max(200),
|
|
31
|
-
value: z.string().max(500),
|
|
32
|
-
}),
|
|
33
|
-
version: z.literal(1),
|
|
34
|
-
}) satisfies z.ZodType<ICoverSlideDataStructure>;
|
|
35
|
-
|
|
36
|
-
export const ThankYouSlideDataUserEditSchema = z.object({
|
|
37
|
-
contentType: z.literal(SLIDE_CONTENT_TYPE.THANK_YOU),
|
|
38
|
-
title: z.string().max(1000),
|
|
39
|
-
author: z.object({
|
|
40
|
-
label: z.string().max(200),
|
|
41
|
-
value: z.string().max(500),
|
|
42
|
-
}),
|
|
43
|
-
date: z.object({
|
|
44
|
-
label: z.string().max(200),
|
|
45
|
-
value: z.string().max(500),
|
|
46
|
-
}),
|
|
47
|
-
email: z.object({
|
|
48
|
-
label: z.string().max(200),
|
|
49
|
-
value: z.string().max(500),
|
|
50
|
-
}),
|
|
51
|
-
version: z.literal(1),
|
|
52
|
-
}) satisfies z.ZodType<IThankYouSlideDataStructure>;
|
|
53
|
-
|
|
54
|
-
export const TextSlideDataUserEditSchema = z.object({
|
|
55
|
-
contentType: z.literal(SLIDE_CONTENT_TYPE.TEXT),
|
|
56
|
-
title: z.string().max(1000),
|
|
57
|
-
description: z.string().max(5000),
|
|
58
|
-
version: z.literal(1),
|
|
59
|
-
}) satisfies z.ZodType<ITextSlideDataStructure>;
|
|
60
|
-
|
|
61
|
-
export const StructuredListSlideDataUserEditSchema = z.object({
|
|
62
|
-
contentType: z.literal(SLIDE_CONTENT_TYPE.STRUCTURED_LIST),
|
|
63
|
-
title: z.string().max(1000),
|
|
64
|
-
description: z.string().max(2000),
|
|
65
|
-
list: z
|
|
66
|
-
.array(
|
|
67
|
-
z.object({
|
|
68
|
-
title: z.string().max(500),
|
|
69
|
-
description: z.string().max(1000),
|
|
70
|
-
}),
|
|
71
|
-
)
|
|
72
|
-
.max(15),
|
|
73
|
-
version: z.literal(1),
|
|
74
|
-
}) satisfies z.ZodType<IStructuredListSlideDataStructure>;
|
|
75
|
-
|
|
76
|
-
export const ContentsSlideDataUserEditSchema = z.object({
|
|
77
|
-
contentType: z.literal(SLIDE_CONTENT_TYPE.CONTENTS),
|
|
78
|
-
title: z.string().max(1000),
|
|
79
|
-
items: z
|
|
80
|
-
.array(
|
|
81
|
-
z.object({
|
|
82
|
-
pageNumber: z.number(),
|
|
83
|
-
title: z.string().max(1000),
|
|
84
|
-
}),
|
|
85
|
-
)
|
|
86
|
-
.max(100),
|
|
87
|
-
version: z.literal(1),
|
|
88
|
-
}) satisfies z.ZodType<IContentsSlideDataStructure>;
|
|
89
|
-
|
|
90
|
-
export const ImageSlideDataUserEditSchema = z.object({
|
|
91
|
-
contentType: z.literal(SLIDE_CONTENT_TYPE.TEXT_WITH_IMAGE),
|
|
92
|
-
title: z.string().max(1000),
|
|
93
|
-
description: z.string().max(4000),
|
|
94
|
-
imageSlot: ImageSlotSchema,
|
|
95
|
-
version: z.literal(1),
|
|
96
|
-
}) satisfies z.ZodType<IImageSlideDataStructure>;
|
|
97
|
-
|
|
98
|
-
export const SectionBreakSlideDataUserEditSchema = z.object({
|
|
99
|
-
contentType: z.literal(SLIDE_CONTENT_TYPE.SECTION_BREAK),
|
|
100
|
-
title: z.string().max(1000),
|
|
101
|
-
description: z.string().max(1000),
|
|
102
|
-
version: z.literal(1),
|
|
103
|
-
}) satisfies z.ZodType<ISectionBreakSlideDataStructure>;
|
|
104
|
-
|
|
105
|
-
export const TableSlideDataUserEditSchema = z.object({
|
|
106
|
-
contentType: z.literal(SLIDE_CONTENT_TYPE.TABLE),
|
|
107
|
-
title: z.string().max(1000),
|
|
108
|
-
description: z.string().max(2000),
|
|
109
|
-
table: z.object({
|
|
110
|
-
columnHeaders: z.array(z.string().max(500)).max(30),
|
|
111
|
-
rows: z.array(z.array(z.string().max(1000))).max(50),
|
|
112
|
-
hasRowHeaders: z.boolean(),
|
|
113
|
-
hasSummaryRow: z.boolean(),
|
|
114
|
-
}),
|
|
115
|
-
version: z.literal(1),
|
|
116
|
-
}) satisfies z.ZodType<ITableSlideDataStructure>;
|
|
117
|
-
|
|
118
|
-
export const BarChartSlideDataUserEditSchema = z.object({
|
|
119
|
-
type: z.literal(SLIDE_CHART_TYPE.BAR),
|
|
120
|
-
categories: z.array(z.string().max(500)).max(100),
|
|
121
|
-
series: z
|
|
122
|
-
.array(
|
|
123
|
-
z.object({
|
|
124
|
-
name: z.string().max(500),
|
|
125
|
-
data: z.array(z.number()),
|
|
126
|
-
type: z.number().min(0).max(11),
|
|
127
|
-
}),
|
|
128
|
-
)
|
|
129
|
-
.max(10),
|
|
130
|
-
yAxisLabel: z.string().max(500).optional(),
|
|
131
|
-
unit: z.string().max(100).optional(),
|
|
132
|
-
version: z.literal(1),
|
|
133
|
-
}) satisfies z.ZodType<IBarChartSlideDataStructure>;
|
|
134
|
-
|
|
135
|
-
export const ChartSlideDataUserEditSchema = z.object({
|
|
136
|
-
contentType: z.literal(SLIDE_CONTENT_TYPE.CHART),
|
|
137
|
-
title: z.string().max(1000),
|
|
138
|
-
description: z.string().max(4000),
|
|
139
|
-
chart: z.discriminatedUnion('type', [BarChartSlideDataUserEditSchema]),
|
|
140
|
-
version: z.literal(1),
|
|
141
|
-
}) satisfies z.ZodType<IChartSlideDataStructure>;
|
|
142
|
-
|
|
143
|
-
export const SlideContentUserEditSchema = z.discriminatedUnion('contentType', [
|
|
144
|
-
CoverSlideDataUserEditSchema,
|
|
145
|
-
StructuredListSlideDataUserEditSchema,
|
|
146
|
-
TextSlideDataUserEditSchema,
|
|
147
|
-
ContentsSlideDataUserEditSchema,
|
|
148
|
-
SectionBreakSlideDataUserEditSchema,
|
|
149
|
-
ImageSlideDataUserEditSchema,
|
|
150
|
-
ThankYouSlideDataUserEditSchema,
|
|
151
|
-
TableSlideDataUserEditSchema,
|
|
152
|
-
ChartSlideDataUserEditSchema,
|
|
153
|
-
]);
|
|
154
|
-
export type SlideContentUserEdit = z.infer<typeof SlideContentUserEditSchema>;
|