@purpleschool/gptbot 0.7.58 → 0.7.59-presentations
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/cabinet.ts +3 -2
- package/api/controllers/http/index.ts +3 -0
- package/api/controllers/http/music.ts +16 -0
- package/api/controllers/http/presentation.ts +10 -0
- package/api/controllers/http/video-editor.ts +14 -0
- package/api/controllers/http/webmaster.ts +10 -0
- package/api/controllers/http/writer.ts +1 -0
- package/api/routes.ts +8 -1
- package/build/api/controllers/http/cabinet.js +3 -2
- package/build/api/controllers/http/index.js +3 -0
- package/build/api/controllers/http/music.js +18 -0
- package/build/api/controllers/http/presentation.js +7 -0
- package/build/api/controllers/http/video-editor.js +16 -0
- package/build/api/controllers/http/webmaster.js +12 -0
- package/build/api/controllers/http/writer.js +1 -0
- package/build/api/routes.js +7 -1
- package/build/commands/auth/register-user.command.js +2 -4
- package/build/commands/auth/vk-login.command.js +5 -2
- package/build/commands/auth/yandex-login.command.js +5 -2
- package/build/commands/cabinet/get-user-statistics-by-month.command.js +25 -0
- package/build/commands/cabinet/get-user-statistics-overview.command.js +26 -0
- package/build/commands/cabinet/index.js +2 -1
- package/build/commands/chat/create-chat.command.js +1 -3
- package/build/commands/chat/find-chat-by-uuid.command.js +1 -1
- package/build/commands/chat/find-chats.command.js +1 -3
- package/build/commands/chat/get-last-active-chat-command.js +1 -1
- package/build/commands/folder/find-folder-by-uuid-with-chats.command.js +1 -3
- package/build/commands/index.js +1 -0
- package/build/commands/product/buy-product.command.js +4 -0
- package/build/commands/subscription/buy-subscription.command.js +4 -0
- package/build/commands/telegram-auth/create-telegram-auth-link.command.js +2 -0
- package/build/commands/telegram-profile/auth-with-telegram-web-app.command.js +4 -0
- package/build/commands/telegram-profile/bot-was-blocked-by-user.command.js +11 -0
- package/build/commands/telegram-profile/index.js +2 -0
- package/build/commands/telegram-profile/user-joined-telegram.command.js +11 -0
- package/build/commands/tools/index.js +2 -0
- package/build/commands/tools/music/convert-to-wav.command.js +16 -0
- package/build/commands/tools/music/delete-all-music-jobs.command.js +8 -0
- package/build/commands/tools/music/delete-music-job-by-uuid.command.js +11 -0
- package/build/commands/tools/music/find-music-job-by-uuid.command.js +14 -0
- package/build/commands/tools/music/find-music-jobs.command.js +18 -0
- package/build/commands/tools/music/generate-lyrics.command.js +16 -0
- package/build/commands/tools/music/generate-music.command.js +15 -0
- package/build/commands/tools/music/get-music-tool-config.command.js +11 -0
- package/build/commands/tools/music/index.js +27 -0
- package/build/commands/tools/music/retry-music-job.command.js +14 -0
- package/build/commands/tools/music/set-reaction-to-music-job.command.js +18 -0
- package/build/commands/tools/music/update-music-job-title.command.js +17 -0
- 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/commands/tools/video-editor/delete-all-video-editor-jobs.command.js +11 -0
- package/build/commands/tools/video-editor/delete-video-editor-job-by-uuid.command.js +14 -0
- package/build/commands/tools/video-editor/edit-video.command.js +16 -0
- package/build/commands/tools/video-editor/find-video-editor-job-by-id.command.js +14 -0
- package/build/commands/tools/video-editor/find-video-editor-jobs.command.js +18 -0
- package/build/commands/tools/video-editor/get-video-editor-config.command.js +14 -0
- package/build/commands/tools/video-editor/index.js +25 -0
- package/build/commands/tools/video-editor/retry-video-editor-job.command.js +14 -0
- package/build/commands/tools/video-editor/set-reaction-to-video-editor-job.command.js +18 -0
- package/build/commands/tools/video-editor/update-video-editor-job-title.command.js +17 -0
- package/build/commands/tools/writer/generate-writer-document-contents.command.js +3 -0
- package/build/commands/tools/writer/index.js +1 -0
- package/build/commands/tools/writer/set-reaction.writer-document.command.js +18 -0
- package/build/commands/user/get-aggregated-user-data.command.js +1 -1
- package/build/commands/user/get-me.command.js +1 -0
- package/build/commands/webmaster/confirm-withdrawal.command.js +14 -0
- package/build/commands/webmaster/create-webmaster.command.js +16 -0
- package/build/commands/webmaster/create-withdrawal-request.command.js +16 -0
- package/build/commands/webmaster/get-my-webmaster.command.js +11 -0
- package/build/commands/webmaster/get-webmaster-balance-overview.command.js +26 -0
- package/build/commands/webmaster/index.js +22 -0
- package/build/commands/webmaster/update-webmaster.command.js +13 -0
- package/build/constants/ai-model/enums/ai-model-config-selector-type.enum.js +1 -0
- package/build/constants/cabinet/enums/group-by.enum.js +9 -0
- package/build/constants/cabinet/enums/index.js +17 -0
- package/build/constants/cabinet/index.js +17 -0
- package/build/constants/errors/errors.js +278 -0
- package/build/constants/file/enums/file-type.enum.js +1 -0
- package/build/constants/file/file.constants.js +4 -1
- package/build/constants/index.js +5 -0
- 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/tool-music/enums/index.js +21 -0
- package/build/constants/tool-music/enums/music-pricing-rule-type.enum.js +7 -0
- package/build/constants/tool-music/enums/music-strategy.enum.js +7 -0
- package/build/constants/tool-music/enums/music-vocal-gender.enum.js +8 -0
- package/build/constants/tool-music/enums/suno-mode-type.enum.js +10 -0
- package/build/constants/tool-music/enums/suno-model-type.enum.js +10 -0
- package/build/constants/tool-music/index.js +17 -0
- package/build/constants/tool-video-editor/enums/index.js +17 -0
- package/build/constants/tool-video-editor/enums/video-editor-model-strategy.enum.js +7 -0
- package/build/constants/tool-video-editor/index.js +17 -0
- package/build/constants/webmaster/enums/index.js +17 -0
- package/build/constants/webmaster/enums/organization-type.enum.js +9 -0
- package/build/constants/webmaster/index.js +17 -0
- package/build/constants/webmaster-balance/enums/index.js +18 -0
- package/build/constants/webmaster-balance/enums/webmaster-balance-status.enum.js +10 -0
- package/build/constants/webmaster-balance/enums/webmaster-balance-type.enum.js +8 -0
- package/build/constants/webmaster-balance/index.js +17 -0
- package/build/constants/writer/enums/index.js +1 -0
- package/build/constants/writer/enums/tool-model-status.enum.js +8 -0
- package/build/helpers/index.js +2 -0
- package/build/helpers/presentation/calculate-presentation-ai-action-price.util.js +16 -0
- package/build/helpers/presentation/index.js +17 -0
- package/build/helpers/video-editor/calculate-video-editing-price.helper.js +6 -0
- package/build/helpers/video-editor/index.js +17 -0
- package/build/helpers/writer/calculate-writer-content-generation-price.util.js +2 -2
- package/build/models/chat-with-messages.schema.js +9 -0
- package/build/models/chat.schema.js +0 -2
- package/build/models/index.js +4 -0
- package/build/models/tools/index.js +3 -0
- package/build/models/tools/music/index.js +20 -0
- package/build/models/tools/music/music-config.schema.js +8 -0
- package/build/models/tools/music/music-job.schema.js +40 -0
- package/build/models/tools/music/music-model.schema.js +32 -0
- package/build/models/tools/music/music-track.schema.js +17 -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/tools/video-editor/index.js +19 -0
- package/build/models/tools/video-editor/video-editor-config.schema.js +8 -0
- package/build/models/tools/video-editor/video-editor-job.schema.js +14 -0
- package/build/models/tools/video-editor/video-editor-model.schema.js +25 -0
- package/build/models/tools/writer/writer-config.schema.js +2 -0
- package/build/models/tools/writer/writer-document.schema.js +2 -0
- package/build/models/tools/writer/writer-model.schema.js +21 -0
- package/build/models/user-referrals.schema.js +15 -0
- package/build/models/user-to-subscription.schema.js +1 -0
- package/build/models/webmaster-balance.schema.js +19 -0
- package/build/models/webmaster.schema.js +21 -0
- package/commands/auth/register-user.command.ts +3 -5
- package/commands/auth/vk-login.command.ts +9 -6
- package/commands/auth/yandex-login.command.ts +7 -4
- package/commands/cabinet/get-user-statistics-by-month.command.ts +25 -0
- package/commands/cabinet/{get-user-statistics.command.ts → get-user-statistics-overview.command.ts} +5 -12
- package/commands/cabinet/index.ts +2 -1
- package/commands/chat/create-chat.command.ts +2 -4
- package/commands/chat/find-chat-by-uuid.command.ts +2 -2
- package/commands/chat/find-chats.command.ts +2 -6
- package/commands/chat/get-last-active-chat-command.ts +2 -2
- package/commands/folder/find-folder-by-uuid-with-chats.command.ts +2 -6
- package/commands/index.ts +1 -0
- package/commands/product/buy-product.command.ts +4 -0
- package/commands/subscription/buy-subscription.command.ts +4 -0
- package/commands/telegram-auth/create-telegram-auth-link.command.ts +5 -0
- package/commands/telegram-profile/auth-with-telegram-web-app.command.ts +4 -0
- package/commands/telegram-profile/bot-was-blocked-by-user.command.ts +13 -0
- package/commands/telegram-profile/index.ts +2 -0
- package/commands/telegram-profile/user-joined-telegram.command.ts +13 -0
- package/commands/tools/index.ts +2 -0
- package/commands/tools/music/convert-to-wav.command.ts +17 -0
- package/commands/tools/music/delete-all-music-jobs.command.ts +6 -0
- package/commands/tools/music/delete-music-job-by-uuid.command.ts +11 -0
- package/commands/tools/music/find-music-job-by-uuid.command.ts +16 -0
- package/commands/tools/music/find-music-jobs.command.ts +18 -0
- package/commands/tools/music/generate-lyrics.command.ts +17 -0
- package/commands/tools/music/generate-music.command.ts +16 -0
- package/commands/tools/music/get-music-tool-config.command.ts +10 -0
- package/commands/tools/music/index.ts +11 -0
- package/commands/tools/music/retry-music-job.command.ts +14 -0
- package/commands/tools/music/set-reaction-to-music-job.command.ts +20 -0
- package/commands/tools/music/update-music-job-title.command.ts +19 -0
- 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/commands/tools/video-editor/delete-all-video-editor-jobs.command.ts +13 -0
- package/commands/tools/video-editor/delete-video-editor-job-by-uuid.command.ts +16 -0
- package/commands/tools/video-editor/edit-video.command.ts +18 -0
- package/commands/tools/video-editor/find-video-editor-job-by-id.command.ts +16 -0
- package/commands/tools/video-editor/find-video-editor-jobs.command.ts +18 -0
- package/commands/tools/video-editor/get-video-editor-config.command.ts +16 -0
- package/commands/tools/video-editor/index.ts +9 -0
- package/commands/tools/video-editor/retry-video-editor-job.command.ts +16 -0
- package/commands/tools/video-editor/set-reaction-to-video-editor-job.command.ts +21 -0
- package/commands/tools/video-editor/update-video-editor-job-title.command.ts +20 -0
- package/commands/tools/writer/generate-writer-document-contents.command.ts +5 -0
- package/commands/tools/writer/index.ts +1 -0
- package/commands/tools/writer/set-reaction.writer-document.command.ts +21 -0
- package/commands/user/get-aggregated-user-data.command.ts +1 -1
- package/commands/user/get-me.command.ts +1 -0
- package/commands/webmaster/confirm-withdrawal.command.ts +16 -0
- package/commands/webmaster/create-webmaster.command.ts +18 -0
- package/commands/webmaster/create-withdrawal-request.command.ts +18 -0
- package/commands/webmaster/get-my-webmaster.command.ts +12 -0
- package/commands/webmaster/get-webmaster-balance-overview.command.ts +29 -0
- package/commands/webmaster/index.ts +6 -0
- package/commands/webmaster/update-webmaster.command.ts +18 -0
- package/constants/ai-model/enums/ai-model-config-selector-type.enum.ts +1 -0
- package/constants/cabinet/enums/group-by.enum.ts +5 -0
- package/constants/cabinet/enums/index.ts +1 -0
- package/constants/cabinet/index.ts +1 -0
- package/constants/errors/errors.ts +278 -0
- package/constants/file/enums/file-type.enum.ts +1 -0
- package/constants/file/file.constants.ts +4 -0
- package/constants/index.ts +5 -0
- 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/tool-music/enums/index.ts +5 -0
- package/constants/tool-music/enums/music-pricing-rule-type.enum.ts +3 -0
- package/constants/tool-music/enums/music-strategy.enum.ts +3 -0
- package/constants/tool-music/enums/music-vocal-gender.enum.ts +4 -0
- package/constants/tool-music/enums/suno-mode-type.enum.ts +6 -0
- package/constants/tool-music/enums/suno-model-type.enum.ts +6 -0
- package/constants/tool-music/index.ts +1 -0
- package/constants/tool-video-editor/enums/index.ts +1 -0
- package/constants/tool-video-editor/enums/video-editor-model-strategy.enum.ts +3 -0
- package/constants/tool-video-editor/index.ts +1 -0
- package/constants/webmaster/enums/index.ts +1 -0
- package/constants/webmaster/enums/organization-type.enum.ts +5 -0
- package/constants/webmaster/index.ts +1 -0
- package/constants/webmaster-balance/enums/index.ts +2 -0
- package/constants/webmaster-balance/enums/webmaster-balance-status.enum.ts +6 -0
- package/constants/webmaster-balance/enums/webmaster-balance-type.enum.ts +4 -0
- package/constants/webmaster-balance/index.ts +1 -0
- package/constants/writer/enums/index.ts +1 -0
- package/constants/writer/enums/tool-model-status.enum.ts +4 -0
- package/helpers/index.ts +2 -0
- package/helpers/presentation/calculate-presentation-ai-action-price.util.ts +20 -0
- package/helpers/presentation/index.ts +1 -0
- package/helpers/video-editor/calculate-video-editing-price.helper.ts +9 -0
- package/helpers/video-editor/index.ts +1 -0
- package/helpers/writer/calculate-writer-content-generation-price.util.ts +4 -2
- package/models/chat-with-messages.schema.ts +7 -0
- package/models/chat.schema.ts +0 -2
- package/models/index.ts +4 -0
- package/models/tools/index.ts +3 -0
- package/models/tools/music/index.ts +4 -0
- package/models/tools/music/music-config.schema.ts +6 -0
- package/models/tools/music/music-job.schema.ts +43 -0
- package/models/tools/music/music-model.schema.ts +33 -0
- package/models/tools/music/music-track.schema.ts +19 -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/tools/video-editor/index.ts +3 -0
- package/models/tools/video-editor/video-editor-config.schema.ts +6 -0
- package/models/tools/video-editor/video-editor-job.schema.ts +14 -0
- package/models/tools/video-editor/video-editor-model.schema.ts +24 -0
- package/models/tools/writer/writer-config.schema.ts +2 -0
- package/models/tools/writer/writer-document.schema.ts +3 -1
- package/models/tools/writer/writer-model.schema.ts +21 -0
- package/models/user-referrals.schema.ts +10 -0
- package/models/user-to-subscription.schema.ts +1 -0
- package/models/webmaster-balance.schema.ts +15 -0
- package/models/webmaster.schema.ts +18 -0
- package/package.json +1 -1
- package/build/commands/cabinet/get-user-statistics.command.js +0 -30
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { WebmasterWithBalanceSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetMyWebmasterCommand {
|
|
5
|
+
export type Request = void;
|
|
6
|
+
|
|
7
|
+
export const ResponseSchema = z.object({
|
|
8
|
+
data: WebmasterWithBalanceSchema,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { GROUP_BY } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export namespace GetWebmasterBalanceOverviewCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
startDate: z.string().refine((v) => !isNaN(Date.parse(v)), {
|
|
7
|
+
message: 'from must be a valid date string',
|
|
8
|
+
}),
|
|
9
|
+
endDate: z.string().refine((v) => !isNaN(Date.parse(v)), {
|
|
10
|
+
message: 'to must be a valid date string',
|
|
11
|
+
}),
|
|
12
|
+
groupBy: z.nativeEnum(GROUP_BY).default(GROUP_BY.DAY),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
16
|
+
|
|
17
|
+
export const WebmasterBalanceOverviewResponseSchema = z.object({
|
|
18
|
+
startDate: z.string(),
|
|
19
|
+
endDate: z.string(),
|
|
20
|
+
total_deposited: z.number(),
|
|
21
|
+
total_withdrawn: z.number(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const ResponseSchema = z.object({
|
|
25
|
+
data: z.array(WebmasterBalanceOverviewResponseSchema),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './create-webmaster.command';
|
|
2
|
+
export * from './update-webmaster.command';
|
|
3
|
+
export * from './get-my-webmaster.command';
|
|
4
|
+
export * from './get-webmaster-balance-overview.command';
|
|
5
|
+
export * from './create-withdrawal-request.command';
|
|
6
|
+
export * from './confirm-withdrawal.command';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { WebmasterSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace UpdateWebmasterCommand {
|
|
5
|
+
export const RequestParamSchema = WebmasterSchema.pick({ uuid: true });
|
|
6
|
+
|
|
7
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
8
|
+
|
|
9
|
+
export const RequestSchema = WebmasterSchema.partial();
|
|
10
|
+
|
|
11
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = z.object({
|
|
14
|
+
data: WebmasterSchema,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './group-by.enum';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enums';
|
|
@@ -2024,4 +2024,282 @@ export const ERRORS = {
|
|
|
2024
2024
|
message: 'Ошибка при получении всех тулов',
|
|
2025
2025
|
httpCode: 500,
|
|
2026
2026
|
},
|
|
2027
|
+
VIDEO_EDITOR_CONFIG_ERROR: {
|
|
2028
|
+
code: 'A414',
|
|
2029
|
+
message: 'Произошла ошибка при получении конфигурации инструмента для редактирования видео',
|
|
2030
|
+
httpCode: 500,
|
|
2031
|
+
},
|
|
2032
|
+
VIDEO_EDITOR_SEND_REQUEST_ERROR: {
|
|
2033
|
+
code: 'A415',
|
|
2034
|
+
message: 'Произошла ошибка при отправке запроса на редактирование видео',
|
|
2035
|
+
httpCode: 500,
|
|
2036
|
+
},
|
|
2037
|
+
VIDEO_EDITOR_FIND_JOBS_ERROR: {
|
|
2038
|
+
code: 'A416',
|
|
2039
|
+
message: 'Произошла ошибка при получении списка заданий на редактирование видео',
|
|
2040
|
+
httpCode: 500,
|
|
2041
|
+
},
|
|
2042
|
+
VIDEO_EDITOR_FIND_JOB_ERROR: {
|
|
2043
|
+
code: 'A417',
|
|
2044
|
+
message: 'Произошла ошибка при получении задания на редактирование видео',
|
|
2045
|
+
httpCode: 500,
|
|
2046
|
+
},
|
|
2047
|
+
VIDEO_EDITOR_RETRY_JOB_ERROR: {
|
|
2048
|
+
code: 'A418',
|
|
2049
|
+
message: 'Произошла ошибка при повторном запросе на редактирование видео',
|
|
2050
|
+
httpCode: 500,
|
|
2051
|
+
},
|
|
2052
|
+
VIDEO_EDITOR_SET_REACTION_ERROR: {
|
|
2053
|
+
code: 'A419',
|
|
2054
|
+
message: 'Произошла ошибка при установке оценки задания на редактирование видео',
|
|
2055
|
+
httpCode: 500,
|
|
2056
|
+
},
|
|
2057
|
+
VIDEO_EDITOR_UPDATE_TITLE_ERROR: {
|
|
2058
|
+
code: 'A420',
|
|
2059
|
+
message: 'Произошла ошибка при обновлении названия задания на редактирование видео',
|
|
2060
|
+
httpCode: 500,
|
|
2061
|
+
},
|
|
2062
|
+
VIDEO_EDITOR_DELETE_JOB_ERROR: {
|
|
2063
|
+
code: 'A421',
|
|
2064
|
+
message: 'Произошла ошибка при удалении задания на редактирование видео',
|
|
2065
|
+
httpCode: 500,
|
|
2066
|
+
},
|
|
2067
|
+
VIDEO_EDITOR_DELETE_ALL_JOBS_ERROR: {
|
|
2068
|
+
code: 'A422',
|
|
2069
|
+
message: 'Произошла ошибка при удалении всех заданий на редактирование видео',
|
|
2070
|
+
httpCode: 500,
|
|
2071
|
+
},
|
|
2072
|
+
VIDEO_EDITOR_MODEL_NOT_FOUND: {
|
|
2073
|
+
code: 'A423',
|
|
2074
|
+
message: 'Не удалось найти указанную модель для редактирования видео',
|
|
2075
|
+
httpCode: 400,
|
|
2076
|
+
},
|
|
2077
|
+
VIDEO_EDITOR_MODEL_INACTIVE: {
|
|
2078
|
+
code: 'A424',
|
|
2079
|
+
message: 'Модель для редактирования видео неактивна',
|
|
2080
|
+
httpCode: 400,
|
|
2081
|
+
},
|
|
2082
|
+
VIDEO_EDITOR_MODEL_NOT_AVAILABLE: {
|
|
2083
|
+
code: 'A425',
|
|
2084
|
+
message: 'Модель для редактирования видео недоступна для данного пользователя',
|
|
2085
|
+
httpCode: 403,
|
|
2086
|
+
},
|
|
2087
|
+
VIDEO_EDITOR_FILE_SIZE_EXCEEDED: {
|
|
2088
|
+
code: 'A426',
|
|
2089
|
+
message: 'Размер файла превышает допустимый лимит для выбранной модели',
|
|
2090
|
+
httpCode: 400,
|
|
2091
|
+
},
|
|
2092
|
+
VIDEO_EDITOR_UNSUPPORTED_FORMAT: {
|
|
2093
|
+
code: 'A427',
|
|
2094
|
+
message: 'Формат файла не поддерживается выбранной моделью',
|
|
2095
|
+
httpCode: 400,
|
|
2096
|
+
},
|
|
2097
|
+
FILE_ACCESS_DENIED: {
|
|
2098
|
+
code: 'A428',
|
|
2099
|
+
message: 'Доступ к файлу запрещен',
|
|
2100
|
+
httpCode: 403,
|
|
2101
|
+
},
|
|
2102
|
+
VIDEO_EDITOR_FILE_DURATION_EXCEEDED: {
|
|
2103
|
+
code: 'A429',
|
|
2104
|
+
message: 'Продолжительность файла превышает допустимый лимит для выбранной модели',
|
|
2105
|
+
httpCode: 400,
|
|
2106
|
+
},
|
|
2107
|
+
WEBMASTER_CREATE_ERROR: {
|
|
2108
|
+
code: 'A430',
|
|
2109
|
+
message: 'Ошибка при создании вебмастера',
|
|
2110
|
+
httpCode: 500,
|
|
2111
|
+
},
|
|
2112
|
+
WEBMASTER_FIND_ERROR: {
|
|
2113
|
+
code: 'A431',
|
|
2114
|
+
message: 'Ошибка при получении вебмастера',
|
|
2115
|
+
httpCode: 500,
|
|
2116
|
+
},
|
|
2117
|
+
WEBMASTER_UPDATE_ERROR: {
|
|
2118
|
+
code: 'A432',
|
|
2119
|
+
message: 'Ошибка при обновлении вебмастера',
|
|
2120
|
+
httpCode: 500,
|
|
2121
|
+
},
|
|
2122
|
+
WEBMASTER_ALIAS_CONFLICT_ERROR: {
|
|
2123
|
+
code: 'A433',
|
|
2124
|
+
message: 'Выбранный alias уже занят',
|
|
2125
|
+
httpCode: 409,
|
|
2126
|
+
},
|
|
2127
|
+
WEBMASTER_NOT_FOUND_ERROR: {
|
|
2128
|
+
code: 'A434',
|
|
2129
|
+
message: 'Запрашиваемый вебмастер не найден',
|
|
2130
|
+
httpCode: 404,
|
|
2131
|
+
},
|
|
2132
|
+
WEBMASTER_OWNERSHIP_ERROR: {
|
|
2133
|
+
code: 'A435',
|
|
2134
|
+
message: 'Кабинет вебмастер не принадлежит юзеру, сделавшему запрос',
|
|
2135
|
+
httpCode: 401,
|
|
2136
|
+
},
|
|
2137
|
+
WEBMASTER_BALANCE_CREATE_ERROR: {
|
|
2138
|
+
code: 'A436',
|
|
2139
|
+
message: 'Ошибка при создании записи баланса вебмастера',
|
|
2140
|
+
httpCode: 500,
|
|
2141
|
+
},
|
|
2142
|
+
WEBMASTER_BALANCE_GET_ERROR: {
|
|
2143
|
+
code: 'A437',
|
|
2144
|
+
message: 'Ошибка при получении баланса вебмастера',
|
|
2145
|
+
httpCode: 500,
|
|
2146
|
+
},
|
|
2147
|
+
WEBMASTER_BALANCE_GET_OVERVIEW_ERROR: {
|
|
2148
|
+
code: 'A438',
|
|
2149
|
+
message: 'Не удалось получить историю баланса вебмастера',
|
|
2150
|
+
httpCode: 500,
|
|
2151
|
+
},
|
|
2152
|
+
WEBMASTER_INSUFFICIENT_BALANCE_ERROR: {
|
|
2153
|
+
code: 'A439',
|
|
2154
|
+
message: 'На балансе недостатчно средств для вывода',
|
|
2155
|
+
httpCode: 400,
|
|
2156
|
+
},
|
|
2157
|
+
WEBMASTER_SEND_WITHDRAWAL_REQUEST_ERROR: {
|
|
2158
|
+
code: 'A440',
|
|
2159
|
+
message: 'Произошла ошибка при отправке запроса на вывод средств в Telegram для вебмастера',
|
|
2160
|
+
httpCode: 500,
|
|
2161
|
+
},
|
|
2162
|
+
WEBMASTER_BALANCE_UPDATE_ERROR: {
|
|
2163
|
+
code: 'A441',
|
|
2164
|
+
message: 'Ошибка при обновлении записи баланса вебмастера',
|
|
2165
|
+
httpCode: 500,
|
|
2166
|
+
},
|
|
2167
|
+
WEBMASTER_PROMOCODE_CONFLICT_ERROR: {
|
|
2168
|
+
code: 'A442',
|
|
2169
|
+
message: 'Вебмастер не может создать промокод для самого себя',
|
|
2170
|
+
httpCode: 409,
|
|
2171
|
+
},
|
|
2172
|
+
WEBMASTER_CREATE_WITHDRAWAL_REQUEST_ERROR: {
|
|
2173
|
+
code: 'A443',
|
|
2174
|
+
message: 'Произошла ошибка при создании запроса на вывод средств для вебмастера',
|
|
2175
|
+
httpCode: 500,
|
|
2176
|
+
},
|
|
2177
|
+
TELEGRAM_SEND_TO_CHANNEL_ERROR: {
|
|
2178
|
+
code: 'A444',
|
|
2179
|
+
message: 'Произошла ошибка при отправке сообщения в телеграм канал',
|
|
2180
|
+
httpCode: 500,
|
|
2181
|
+
},
|
|
2182
|
+
WRITER_SET_REACTION_TO_WRITER_DOCUMENT_ERROR: {
|
|
2183
|
+
code: 'A445',
|
|
2184
|
+
message: 'Произошла ошибка при установке реакции на документ',
|
|
2185
|
+
httpCode: 500,
|
|
2186
|
+
},
|
|
2187
|
+
MUSIC_CONFIG_ERROR: {
|
|
2188
|
+
code: 'A446',
|
|
2189
|
+
message: 'Произошла ошибка при получении конфигурации инструмента для генерации музыки',
|
|
2190
|
+
httpCode: 500,
|
|
2191
|
+
},
|
|
2192
|
+
MUSIC_SEND_REQUEST_ERROR: {
|
|
2193
|
+
code: 'A447',
|
|
2194
|
+
message: 'Произошла ошибка при отправке запроса на генерацию музыки',
|
|
2195
|
+
httpCode: 500,
|
|
2196
|
+
},
|
|
2197
|
+
MUSIC_FIND_JOBS_ERROR: {
|
|
2198
|
+
code: 'A448',
|
|
2199
|
+
message: 'Произошла ошибка при получении списка заданий на генерацию музыки',
|
|
2200
|
+
httpCode: 500,
|
|
2201
|
+
},
|
|
2202
|
+
MUSIC_FIND_JOB_ERROR: {
|
|
2203
|
+
code: 'A449',
|
|
2204
|
+
message: 'Произошла ошибка при получении задания на генерацию музыки',
|
|
2205
|
+
httpCode: 500,
|
|
2206
|
+
},
|
|
2207
|
+
MUSIC_RETRY_JOB_ERROR: {
|
|
2208
|
+
code: 'A450',
|
|
2209
|
+
message: 'Произошла ошибка при повторном запросе на генерацию музыки',
|
|
2210
|
+
httpCode: 500,
|
|
2211
|
+
},
|
|
2212
|
+
MUSIC_SET_REACTION_ERROR: {
|
|
2213
|
+
code: 'A451',
|
|
2214
|
+
message: 'Произошла ошибка при установке оценки задания на генерацию музыки',
|
|
2215
|
+
httpCode: 500,
|
|
2216
|
+
},
|
|
2217
|
+
MUSIC_UPDATE_TITLE_ERROR: {
|
|
2218
|
+
code: 'A452',
|
|
2219
|
+
message: 'Произошла ошибка при обновлении названия задания на генерацию музыки',
|
|
2220
|
+
httpCode: 500,
|
|
2221
|
+
},
|
|
2222
|
+
MUSIC_DELETE_JOB_ERROR: {
|
|
2223
|
+
code: 'A453',
|
|
2224
|
+
message: 'Произошла ошибка при удалении задания на генерацию музыки',
|
|
2225
|
+
httpCode: 500,
|
|
2226
|
+
},
|
|
2227
|
+
MUSIC_DELETE_ALL_JOBS_ERROR: {
|
|
2228
|
+
code: 'A454',
|
|
2229
|
+
message: 'Произошла ошибка при удалении всех заданий на генерацию музыки',
|
|
2230
|
+
httpCode: 500,
|
|
2231
|
+
},
|
|
2232
|
+
MUSIC_MODEL_NOT_FOUND: {
|
|
2233
|
+
code: 'A455',
|
|
2234
|
+
message: 'Не удалось найти указанную модель для генерации музыки',
|
|
2235
|
+
httpCode: 400,
|
|
2236
|
+
},
|
|
2237
|
+
MUSIC_MODEL_INACTIVE: {
|
|
2238
|
+
code: 'A456',
|
|
2239
|
+
message: 'Модель для генерации музыки неактивна',
|
|
2240
|
+
httpCode: 400,
|
|
2241
|
+
},
|
|
2242
|
+
MUSIC_MODEL_NOT_AVAILABLE: {
|
|
2243
|
+
code: 'A457',
|
|
2244
|
+
message: 'Модель для генерации музыки недоступна для данного пользователя',
|
|
2245
|
+
httpCode: 403,
|
|
2246
|
+
},
|
|
2247
|
+
MUSIC_MAX_SYMBOLS_EXCEEDED: {
|
|
2248
|
+
code: 'A458',
|
|
2249
|
+
message: 'Превышена максимальная количество символов',
|
|
2250
|
+
},
|
|
2251
|
+
MUSIC_INVALID_VOCAL: {
|
|
2252
|
+
code: 'A459',
|
|
2253
|
+
message: 'Выбран неверный голос для вокала',
|
|
2254
|
+
},
|
|
2255
|
+
MUSIC_JOB_DELETE_ERROR: {
|
|
2256
|
+
code: 'A460',
|
|
2257
|
+
message: 'Произошла ошибка при удалении сообщения',
|
|
2258
|
+
httpCode: 500,
|
|
2259
|
+
},
|
|
2260
|
+
MUSIC_RETRY_REQUEST_ERROR: {
|
|
2261
|
+
code: 'A461',
|
|
2262
|
+
message: 'Произошла ошибка при повторном запросе на генерацию музыки',
|
|
2263
|
+
httpCode: 500,
|
|
2264
|
+
},
|
|
2265
|
+
MUSIC_LYRICS_GENERATION_ERROR: {
|
|
2266
|
+
code: 'A462',
|
|
2267
|
+
message: 'Произошла ошибка при запросе на генерацию текста песни',
|
|
2268
|
+
httpCode: 500,
|
|
2269
|
+
},
|
|
2270
|
+
MUSIC_CONVERT_TO_WAV_ERROR: {
|
|
2271
|
+
code: 'A463',
|
|
2272
|
+
message: 'Произошла ошибка при запросе на конвертацию mp3 в wav',
|
|
2273
|
+
httpCode: 500,
|
|
2274
|
+
},
|
|
2275
|
+
WRITER_MODEL_NOT_FOUND: {
|
|
2276
|
+
code: 'A464',
|
|
2277
|
+
message: 'Не удалось найти указанную модель для Writer',
|
|
2278
|
+
httpCode: 400,
|
|
2279
|
+
},
|
|
2280
|
+
WRITER_MODEL_INACTIVE: {
|
|
2281
|
+
code: 'A465',
|
|
2282
|
+
message: 'Модель Writer архивирована и недоступна для пользования',
|
|
2283
|
+
httpCode: 403,
|
|
2284
|
+
},
|
|
2285
|
+
WRITER_MODEL_ACCESS_DENIED: {
|
|
2286
|
+
code: 'A466',
|
|
2287
|
+
message: 'У вас нет доступа к этой модели Writer',
|
|
2288
|
+
httpCode: 403,
|
|
2289
|
+
},
|
|
2290
|
+
WEBMASTER_BONUS_APPLY_ERROR: {
|
|
2291
|
+
code: 'A449',
|
|
2292
|
+
message: 'Не удалось применить бонусы вебмастеру',
|
|
2293
|
+
httpCode: 500,
|
|
2294
|
+
},
|
|
2295
|
+
SLIDE_IMAGE_SLOT_UPDATE_ERROR: {
|
|
2296
|
+
code: 'A450',
|
|
2297
|
+
message: 'Произошла ошибка при обновлении изображения на слайде',
|
|
2298
|
+
httpCode: 500,
|
|
2299
|
+
},
|
|
2300
|
+
FILE_TYPE_NOT_SUPPORTED: {
|
|
2301
|
+
code: 'A451',
|
|
2302
|
+
message: 'Неподдерживаемый тип файла',
|
|
2303
|
+
httpCode: 400,
|
|
2304
|
+
},
|
|
2027
2305
|
};
|
|
@@ -4,6 +4,7 @@ export const MAX_IMAGE_UPLOAD_SIZE = 5 * 1024 * 1024; // 5 MB
|
|
|
4
4
|
export const MAX_AUDIO_UPLOAD_SIZE = 500 * 1024 * 1024; // 500 MB
|
|
5
5
|
export const MAX_TEXT_UPLOAD_SIZE = 10 * 1024 * 1024; // 10 MB
|
|
6
6
|
export const MAX_DOC_UPLOAD_SIZE = 20 * 1024 * 1024; // 20 MB
|
|
7
|
+
export const MAX_VIDEO_UPLOAD_SIZE = 500 * 1024 * 1024; // 500 MB
|
|
7
8
|
|
|
8
9
|
export const SUPPORTED_FILES = new Map<
|
|
9
10
|
string,
|
|
@@ -60,6 +61,9 @@ export const SUPPORTED_FILES = new Map<
|
|
|
60
61
|
], //.xlsx
|
|
61
62
|
|
|
62
63
|
['application/pdf', { type: FILE_TYPE.DOCUMENT, size: MAX_DOC_UPLOAD_SIZE }],
|
|
64
|
+
|
|
65
|
+
// Video formats
|
|
66
|
+
['video/mp4', { type: FILE_TYPE.VIDEO, size: MAX_VIDEO_UPLOAD_SIZE }],
|
|
63
67
|
]);
|
|
64
68
|
|
|
65
69
|
export const DELETE_UNUSED_FILES_AFTER_HOURS = 12;
|
package/constants/index.ts
CHANGED
|
@@ -31,7 +31,12 @@ export * from './promocode';
|
|
|
31
31
|
export * from './ui-notification';
|
|
32
32
|
export * from './review';
|
|
33
33
|
export * from './tool-video';
|
|
34
|
+
export * from './tool-video-editor';
|
|
34
35
|
export * from './writer';
|
|
35
36
|
export * from './tool-image-editor';
|
|
36
37
|
export * from './feedback';
|
|
37
38
|
export * from './daily-streak';
|
|
39
|
+
export * from './cabinet';
|
|
40
|
+
export * from './webmaster';
|
|
41
|
+
export * from './webmaster-balance';
|
|
42
|
+
export * from './tool-music';
|
|
@@ -3,3 +3,7 @@ export * from './slide-content-type.enum';
|
|
|
3
3
|
export * from './slide-icon-slot-status.enum';
|
|
4
4
|
export * from './slide-image-slot.status.enum';
|
|
5
5
|
export * from './slide-layout.enum';
|
|
6
|
+
export * from './slide-image-slot-action.enum';
|
|
7
|
+
export * from './presentation-ai-action-type.enum';
|
|
8
|
+
export * from './presentation-ai-action-pricing-type.enum';
|
|
9
|
+
export * from './presentation-ai-action-call-status.enum';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enums';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './video-editor-model-strategy.enum';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enums';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './organization-type.enum';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enums';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enums';
|
package/helpers/index.ts
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PRESENTATION_AI_ACTION_PRICING_TYPE } from '../../constants';
|
|
2
|
+
import { PresentationAiActionPricingRules } from '../../models/tools/presentation';
|
|
3
|
+
|
|
4
|
+
export function calculatePresentationAiActionPrice(
|
|
5
|
+
pricingRules: PresentationAiActionPricingRules,
|
|
6
|
+
selectionText: string,
|
|
7
|
+
): number {
|
|
8
|
+
switch (pricingRules.type) {
|
|
9
|
+
case PRESENTATION_AI_ACTION_PRICING_TYPE.PER_CHARACTER:
|
|
10
|
+
const characterCount = selectionText.length;
|
|
11
|
+
const price = characterCount * pricingRules.price;
|
|
12
|
+
return Math.max(1, Math.ceil(price));
|
|
13
|
+
|
|
14
|
+
case PRESENTATION_AI_ACTION_PRICING_TYPE.FLAT:
|
|
15
|
+
return Math.max(1, Math.ceil(pricingRules.price));
|
|
16
|
+
|
|
17
|
+
default:
|
|
18
|
+
throw new Error(`Unknown pricing type`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './calculate-presentation-ai-action-price.util';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './calculate-video-editing-price.helper';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { WriterModel } from '../../models/tools/writer/writer-model.schema';
|
|
2
|
+
|
|
3
|
+
export function calculateWriterContentGenerationPrice(pages: number, aiModel: WriterModel): number {
|
|
4
|
+
return Math.max(1, pages * aiModel.pricePerPage);
|
|
3
5
|
}
|
package/models/chat.schema.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { CHAT_STATUS_ENUM, TChatStatusEnum } from '../constants';
|
|
3
|
-
import { MessageSchema } from './message.schema';
|
|
4
3
|
|
|
5
4
|
export const ChatSchema = z.object({
|
|
6
5
|
uuid: z.string().uuid(),
|
|
@@ -10,7 +9,6 @@ export const ChatSchema = z.object({
|
|
|
10
9
|
aIModelId: z.string().uuid(),
|
|
11
10
|
title: z.string(),
|
|
12
11
|
chatStatus: z.enum(Object.values(CHAT_STATUS_ENUM) as [TChatStatusEnum]),
|
|
13
|
-
messages: z.array(MessageSchema),
|
|
14
12
|
folderId: z.string().nullable(),
|
|
15
13
|
|
|
16
14
|
createdAt: z.date(),
|
package/models/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './ai-model-formatted.schema';
|
|
|
4
4
|
export * from './ai-model.schema';
|
|
5
5
|
export * from './ai-vendor.schema';
|
|
6
6
|
export * from './category.schema';
|
|
7
|
+
export * from './chat-with-messages.schema';
|
|
7
8
|
export * from './chat.schema';
|
|
8
9
|
export * from './cloud-payments-receipt.schema';
|
|
9
10
|
export * from './course-author.schema';
|
|
@@ -49,3 +50,6 @@ export * from './folder.schema';
|
|
|
49
50
|
export * from './filters.schema';
|
|
50
51
|
export * from './users-filter-notification.schema';
|
|
51
52
|
export * from './daily-streak';
|
|
53
|
+
export * from './webmaster.schema';
|
|
54
|
+
export * from './webmaster-balance.schema';
|
|
55
|
+
export * from './user-referrals.schema';
|