@purpleschool/gptbot-tools 0.0.130-stage-2 → 0.0.131
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/common/errors/errors.js +5 -0
- package/build/image-editor/commands/image-editor.command.js +1 -2
- package/build/image-editor/commands/index.js +0 -1
- package/build/image-editor/commands/retry-image-editor-job.command.js +1 -2
- package/build/image-editor/models/image-editor-job.schema.js +0 -1
- package/build/image-editor/routes/image-editor.amqp.routes.js +0 -1
- package/build/image-generation/commands/execute-image-generation.command.js +2 -3
- package/build/image-generation/commands/index.js +0 -1
- package/build/image-generation/commands/retry-image-generation-job.command.js +3 -4
- package/build/image-generation/models/image-generation-job.schema.js +0 -1
- package/build/image-generation/routes/image-generation.amqp.routes.js +0 -1
- package/build/music/commands/generate-music.command.js +1 -2
- package/build/music/commands/index.js +0 -1
- package/build/music/commands/retry-music-job.command.js +1 -2
- package/build/music/models/music-job.schema.js +0 -1
- package/build/music/routes/music.amqp.routes.js +0 -1
- package/build/paraphrase/commands/index.js +0 -1
- package/build/paraphrase/commands/paraphrase.command.js +1 -2
- package/build/paraphrase/commands/retry-paraphrase-job.command.js +1 -2
- package/build/paraphrase/models/paraphrase-job.schema.js +0 -1
- package/build/paraphrase/routes/paraphrase.amqp.routes.js +0 -1
- package/build/presentation/commands/generate-slides.command.js +1 -2
- package/build/presentation/commands/index.js +0 -1
- package/build/presentation/models/presentation.schema.js +0 -1
- package/build/presentation/routes/presentation.routes.js +0 -1
- package/build/stt/commands/index.js +0 -1
- package/build/stt/commands/retry-stt-job.command.js +1 -2
- package/build/stt/commands/stt.command.js +1 -2
- package/build/stt/models/stt-job.schema.js +0 -1
- package/build/stt/routes/stt.amqp.routes.js +0 -1
- package/build/tools/events/index.js +0 -1
- package/build/tools/models/tool-job.schema.js +0 -1
- package/build/tools/routes/tools.aqmp.routes.js +0 -1
- package/build/tts/commands/index.js +0 -1
- package/build/tts/commands/retry-tts-job.command.js +1 -2
- package/build/tts/commands/tts.command.js +1 -2
- package/build/tts/models/tts-job.schema.js +0 -1
- package/build/tts/routes/tts.amqp.routes.js +0 -1
- package/build/video/commands/index.js +0 -1
- package/build/video/commands/retry-video-job.command.js +1 -2
- package/build/video/commands/video.command.js +1 -2
- package/build/video/models/video-job.schema.js +0 -1
- package/build/video/routes/video.amqp.routes.js +0 -1
- package/build/video-editor/commands/edit-video.command.js +1 -2
- package/build/video-editor/commands/index.js +0 -1
- package/build/video-editor/commands/retry-video-editor-job.command.js +1 -2
- package/build/video-editor/models/video-editor-job.schema.js +0 -1
- package/build/video-editor/routes/video-editor.amqp.routes.js +0 -1
- package/build/writer/commands/generate-document-contents.command.js +1 -2
- package/build/writer/commands/index.js +1 -1
- package/build/writer/commands/update-writer-document-outline.command.js +0 -1
- package/build/writer/commands/update-writer-document-title-page.command.js +16 -0
- package/build/writer/models/writer-document-title-page.schema.js +2 -4
- package/build/writer/models/writer-document.schema.js +0 -1
- package/build/writer/routes/writer.routes.js +1 -1
- package/common/errors/errors.ts +5 -0
- package/image-editor/commands/image-editor.command.ts +1 -2
- package/image-editor/commands/index.ts +0 -1
- package/image-editor/commands/retry-image-editor-job.command.ts +1 -2
- package/image-editor/models/image-editor-job.schema.ts +0 -1
- package/image-editor/routes/image-editor.amqp.routes.ts +0 -1
- package/image-generation/commands/execute-image-generation.command.ts +2 -3
- package/image-generation/commands/index.ts +0 -1
- package/image-generation/commands/retry-image-generation-job.command.ts +3 -4
- package/image-generation/models/image-generation-job.schema.ts +0 -1
- package/image-generation/routes/image-generation.amqp.routes.ts +0 -1
- package/music/commands/generate-music.command.ts +1 -2
- package/music/commands/index.ts +0 -1
- package/music/commands/retry-music-job.command.ts +1 -2
- package/music/models/music-job.schema.ts +0 -1
- package/music/routes/music.amqp.routes.ts +0 -1
- package/package.json +1 -1
- package/paraphrase/commands/index.ts +0 -1
- package/paraphrase/commands/paraphrase.command.ts +1 -2
- package/paraphrase/commands/retry-paraphrase-job.command.ts +1 -2
- package/paraphrase/models/paraphrase-job.schema.ts +0 -1
- package/paraphrase/routes/paraphrase.amqp.routes.ts +0 -1
- package/presentation/commands/generate-slides.command.ts +1 -2
- package/presentation/commands/index.ts +0 -1
- package/presentation/models/presentation.schema.ts +0 -1
- package/presentation/routes/presentation.routes.ts +0 -1
- package/stt/commands/index.ts +0 -1
- package/stt/commands/retry-stt-job.command.ts +1 -2
- package/stt/commands/stt.command.ts +1 -2
- package/stt/models/stt-job.schema.ts +0 -1
- package/stt/routes/stt.amqp.routes.ts +0 -1
- package/tools/events/index.ts +0 -1
- package/tools/models/tool-job.schema.ts +0 -1
- package/tools/routes/tools.aqmp.routes.ts +0 -1
- package/tts/commands/index.ts +0 -1
- package/tts/commands/retry-tts-job.command.ts +1 -2
- package/tts/commands/tts.command.ts +1 -2
- package/tts/models/tts-job.schema.ts +0 -1
- package/tts/routes/tts.amqp.routes.ts +0 -1
- package/video/commands/index.ts +0 -1
- package/video/commands/retry-video-job.command.ts +1 -2
- package/video/commands/video.command.ts +1 -2
- package/video/models/video-job.schema.ts +0 -1
- package/video/routes/video.amqp.routes.ts +0 -1
- package/video-editor/commands/edit-video.command.ts +1 -2
- package/video-editor/commands/index.ts +0 -1
- package/video-editor/commands/retry-video-editor-job.command.ts +1 -2
- package/video-editor/models/video-editor-job.schema.ts +0 -1
- package/video-editor/routes/video-editor.amqp.routes.ts +0 -1
- package/writer/commands/generate-document-contents.command.ts +1 -2
- package/writer/commands/index.ts +1 -1
- package/writer/commands/update-writer-document-outline.command.ts +1 -2
- package/writer/commands/update-writer-document-title-page.command.ts +16 -0
- package/writer/models/writer-document-title-page.schema.ts +9 -11
- package/writer/models/writer-document.schema.ts +0 -1
- package/writer/routes/writer.routes.ts +1 -1
- package/build/image-editor/commands/get-image-editor-price.command.js +0 -24
- package/build/image-generation/commands/get-image-generation-price.command.js +0 -22
- package/build/music/commands/get-music-price.command.js +0 -20
- package/build/paraphrase/commands/get-paraphrase-price.command.js +0 -15
- package/build/presentation/commands/get-presentation-slides-generation-price.command.js +0 -15
- package/build/stt/commands/get-stt-price.command.js +0 -16
- package/build/tools/events/tool-job-failed.event.js +0 -14
- package/build/tts/commands/get-tts-price.command.js +0 -16
- package/build/video/commands/get-video-price.command.js +0 -17
- package/build/video-editor/commands/get-video-editor-price.command.js +0 -15
- package/build/writer/commands/get-writer-content-generation-price.command.js +0 -16
- package/image-editor/commands/get-image-editor-price.command.ts +0 -26
- package/image-generation/commands/get-image-generation-price.command.ts +0 -24
- package/music/commands/get-music-price.command.ts +0 -22
- package/paraphrase/commands/get-paraphrase-price.command.ts +0 -16
- package/presentation/commands/get-presentation-slides-generation-price.command.ts +0 -16
- package/stt/commands/get-stt-price.command.ts +0 -17
- package/tools/events/tool-job-failed.event.ts +0 -13
- package/tts/commands/get-tts-price.command.ts +0 -17
- package/video/commands/get-video-price.command.ts +0 -18
- package/video-editor/commands/get-video-editor-price.command.ts +0 -16
- package/writer/commands/get-writer-content-generation-price.command.ts +0 -17
|
@@ -9,9 +9,9 @@ exports.WRITER_AMQP_ROUTES = {
|
|
|
9
9
|
DELETE_DOCUMENT: 'tools.writer.delete-document.rpc',
|
|
10
10
|
DELETE_ALL_USER_DOCUMENTS: 'tools.writer.delete-all-user-documents.rpc',
|
|
11
11
|
UPDATE_DOCUMENT_OUTLINE: 'tools.writer.update-document-outline.rpc',
|
|
12
|
+
UPDATE_DOCUMENT_TITLE_PAGE: 'tools.writer.update-document-title-page.rpc',
|
|
12
13
|
UPDATE_DOCUMENT_CONTENTS: 'tools.writer.update-document-contents.rpc',
|
|
13
14
|
GENERATE_DOCUMENT_CONTENTS: 'tools.writer.generate-document-contents.rpc',
|
|
14
|
-
GET_CONTENT_GENERATION_PRICE: 'tools.writer.content-generation.get-price.rpc',
|
|
15
15
|
PARAPHRASE: 'tools.writer.actions.paraphrase.rpc',
|
|
16
16
|
EXTEND_TEXT: 'tools.writer.actions.extend-text.rpc',
|
|
17
17
|
SHORTEN_TEXT: 'tools.writer.actions.shorten-text.rpc',
|
package/common/errors/errors.ts
CHANGED
|
@@ -776,6 +776,11 @@ export const ERRORS = {
|
|
|
776
776
|
message: 'Произошла ошибка при экспорте документа в docx',
|
|
777
777
|
httpCode: 500,
|
|
778
778
|
},
|
|
779
|
+
TITLE_PAGE_UPDATE_ERROR: {
|
|
780
|
+
code: 'WRITER_DOCUMENT.TITLE_PAGE_UPDATE_ERROR',
|
|
781
|
+
message: 'Произошла ошибка при обновлении титульного листа документа',
|
|
782
|
+
httpCode: 500,
|
|
783
|
+
},
|
|
779
784
|
},
|
|
780
785
|
WRITER_AI_ACTION: {
|
|
781
786
|
AI_ERROR: {
|
|
@@ -8,14 +8,13 @@ export namespace ImageEditorCommand {
|
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
10
|
prompt: z.string(),
|
|
11
|
+
userBalance: z.number(),
|
|
11
12
|
modelId: z.string(),
|
|
12
13
|
params: z.object({
|
|
13
14
|
attachedFiles: z.array(AttachedFileSchema),
|
|
14
15
|
systemPromptId: z.string().optional(),
|
|
15
16
|
}),
|
|
16
17
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
17
|
-
tokenReservationId: z.string().uuid(),
|
|
18
|
-
precalculatedPrice: z.number(),
|
|
19
18
|
});
|
|
20
19
|
export type Request = z.infer<typeof RequestSchema>;
|
|
21
20
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './delete-image-editor-job-by-uuid.command';
|
|
2
2
|
export * from './delete-all-image-editor-jobs.command';
|
|
3
|
-
export * from './get-image-editor-price.command';
|
|
4
3
|
export * from './retry-image-editor-job.command';
|
|
5
4
|
export * from './set-reaction-to-image-editor-job.command';
|
|
6
5
|
export * from './image-editor.command';
|
|
@@ -5,11 +5,10 @@ import { ImageEditorJobParamsSchema, ImageEditorJobSchema } from '../models';
|
|
|
5
5
|
export namespace RetryImageEditorJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
userBalance: z.number(),
|
|
8
9
|
userId: z.string().uuid().nullable().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
11
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
11
|
-
tokenReservationId: z.string().uuid(),
|
|
12
|
-
precalculatedPrice: z.number(),
|
|
13
12
|
modelId: z.string().optional(),
|
|
14
13
|
prompt: z.string().optional(),
|
|
15
14
|
params: ImageEditorJobParamsSchema.optional(),
|
|
@@ -29,7 +29,6 @@ export const ImageEditorJobSchema = z.object({
|
|
|
29
29
|
isPublished: z.boolean(),
|
|
30
30
|
postId: z.string().nullable(),
|
|
31
31
|
isDeleted: z.boolean(),
|
|
32
|
-
tokenReservationId: z.string().nullable().optional(),
|
|
33
32
|
createdAt: z.date(),
|
|
34
33
|
completedAt: z.date().nullable().optional(),
|
|
35
34
|
updatedAt: z.date(),
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
import { JOB_REQUEST_ORIGIN } from '../../tools';
|
|
4
3
|
import { ImageGenerationJobSchema, ImageGenerationRequestParamsSchema } from '../models';
|
|
4
|
+
import { JOB_REQUEST_ORIGIN } from '../../tools';
|
|
5
5
|
|
|
6
6
|
export namespace ExecuteImageGenerationCommand {
|
|
7
7
|
export const RequestSchema = z.object({
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
10
|
prompt: z.string(),
|
|
11
|
+
userBalance: z.number(),
|
|
11
12
|
modelId: z.string().uuid(),
|
|
12
13
|
params: ImageGenerationRequestParamsSchema,
|
|
13
14
|
presetId: z.string().uuid().nullable().optional(),
|
|
14
15
|
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API),
|
|
15
16
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
16
|
-
tokenReservationId: z.string().uuid(),
|
|
17
|
-
precalculatedPrice: z.number(),
|
|
18
17
|
});
|
|
19
18
|
export type Request = z.infer<typeof RequestSchema>;
|
|
20
19
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './execute-image-generation.command';
|
|
2
2
|
export * from './forward-image-generation-job.command';
|
|
3
|
-
export * from './get-image-generation-price.command';
|
|
4
3
|
export * from './save-image-generation-job.command';
|
|
5
4
|
export * from './soft-delete-image-generation-job-by-uuid.command';
|
|
6
5
|
export * from './soft-delete-image-generation-jobs-by-criteria.command';
|
|
@@ -7,13 +7,12 @@ export namespace RetryImageGenerationJobCommand {
|
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
-
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
11
|
-
tokenReservationId: z.string().uuid(),
|
|
12
|
-
precalculatedPrice: z.number(),
|
|
13
|
-
modelId: z.string().uuid().optional(),
|
|
14
10
|
prompt: z.string().optional(),
|
|
11
|
+
userBalance: z.number(),
|
|
12
|
+
modelId: z.string().uuid().optional(),
|
|
15
13
|
params: ImageGenerationRequestParamsSchema.optional(),
|
|
16
14
|
presetId: z.string().uuid().nullable().optional(),
|
|
15
|
+
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
17
16
|
});
|
|
18
17
|
export type Request = z.infer<typeof RequestSchema>;
|
|
19
18
|
|
|
@@ -32,7 +32,6 @@ export const ImageGenerationJobSchema = z.object({
|
|
|
32
32
|
postId: z.string().nullable(),
|
|
33
33
|
isDeleted: z.boolean(),
|
|
34
34
|
internalError: z.string().nullable(),
|
|
35
|
-
tokenReservationId: z.string().nullable().optional(),
|
|
36
35
|
createdAt: z.date(),
|
|
37
36
|
updatedAt: z.date(),
|
|
38
37
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export const IMAGE_GENERATION_AMQP_ROUTES = {
|
|
2
2
|
EXECUTE: 'tools.image-generation.execute.rpc',
|
|
3
|
-
GET_PRICE: 'tools.image-generation.get-price.rpc',
|
|
4
3
|
CONFIG: 'tools.image-generation.config.rpc',
|
|
5
4
|
FORWARD_JOB: 'tools.image-generation.jobs.forward.rpc',
|
|
6
5
|
GET_JOB: 'tools.image-generation.jobs.get.rpc',
|
|
@@ -7,10 +7,9 @@ export namespace GenerateMusicCommand {
|
|
|
7
7
|
export const RequestSchema = z.object({
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
userBalance: z.number(),
|
|
10
11
|
modelId: z.string(),
|
|
11
12
|
params: MusicJobParamsSchema,
|
|
12
|
-
tokenReservationId: z.string().uuid(),
|
|
13
|
-
precalculatedPrice: z.number(),
|
|
14
13
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
15
14
|
});
|
|
16
15
|
export type Request = z.infer<typeof RequestSchema>;
|
package/music/commands/index.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './delete-all-music-jobs.command';
|
|
|
3
3
|
export * from './retry-music-job.command';
|
|
4
4
|
export * from './set-reaction-to-music-job.command';
|
|
5
5
|
export * from './generate-music.command';
|
|
6
|
-
export * from './get-music-price.command';
|
|
7
6
|
export * from './update-music-job-title.command';
|
|
8
7
|
export * from './convert-to-wav.command';
|
|
9
8
|
export * from './generate-lyrics.command';
|
|
@@ -5,10 +5,9 @@ import { MusicJobParamsSchema, MusicJobSchema } from '../models/music-job.schema
|
|
|
5
5
|
export namespace RetryMusicJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
userBalance: z.number(),
|
|
8
9
|
userId: z.string().uuid().nullable().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
-
tokenReservationId: z.string().uuid(),
|
|
11
|
-
precalculatedPrice: z.number(),
|
|
12
11
|
modelId: z.string().uuid().optional(),
|
|
13
12
|
params: MusicJobParamsSchema.optional(),
|
|
14
13
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
@@ -48,7 +48,6 @@ export const MusicJobSchema = z.object({
|
|
|
48
48
|
userId: z.string().nullable().optional(),
|
|
49
49
|
unregisteredUserId: z.string().nullable().optional(),
|
|
50
50
|
isDeleted: z.boolean(),
|
|
51
|
-
tokenReservationId: z.string().nullable().optional(),
|
|
52
51
|
createdAt: z.date(),
|
|
53
52
|
completedAt: z.date().nullable().optional(),
|
|
54
53
|
updatedAt: z.date(),
|
package/package.json
CHANGED
|
@@ -7,12 +7,11 @@ export namespace ParaphraseCommand {
|
|
|
7
7
|
export const RequestSchema = z.object({
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
userBalance: z.number(),
|
|
10
11
|
prompt: z.string(),
|
|
11
12
|
typeId: z.string().uuid(),
|
|
12
13
|
styleId: z.string().uuid(),
|
|
13
14
|
intensity: z.nativeEnum(PARAPHRASING_INTENSITY),
|
|
14
|
-
tokenReservationId: z.string().uuid(),
|
|
15
|
-
precalculatedPrice: z.number(),
|
|
16
15
|
});
|
|
17
16
|
export type Request = z.infer<typeof RequestSchema>;
|
|
18
17
|
|
|
@@ -5,10 +5,9 @@ import { ParaphraseJobSchema } from '../models/paraphrase-job.schema';
|
|
|
5
5
|
export namespace RetryParaphraseJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
userBalance: z.number(),
|
|
8
9
|
userId: z.string().uuid().nullable().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
-
tokenReservationId: z.string().uuid(),
|
|
11
|
-
precalculatedPrice: z.number(),
|
|
12
11
|
});
|
|
13
12
|
export type Request = z.infer<typeof RequestSchema>;
|
|
14
13
|
|
|
@@ -19,7 +19,6 @@ export const ParaphraseJobSchema = z.object({
|
|
|
19
19
|
typeId: z.string(),
|
|
20
20
|
styleId: z.string(),
|
|
21
21
|
intensity: z.nativeEnum(PARAPHRASING_INTENSITY),
|
|
22
|
-
tokenReservationId: z.string().nullable().optional(),
|
|
23
22
|
createdAt: z.date(),
|
|
24
23
|
updatedAt: z.date(),
|
|
25
24
|
completedAt: z.date().nullable(),
|
|
@@ -7,8 +7,7 @@ export namespace GenerateSlidesCommand {
|
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
-
|
|
11
|
-
precalculatedPrice: z.number(),
|
|
10
|
+
userBalance: z.number(),
|
|
12
11
|
});
|
|
13
12
|
export type Request = z.infer<typeof RequestSchema>;
|
|
14
13
|
|
|
@@ -7,7 +7,6 @@ export * from './generate-presentation-outline.command';
|
|
|
7
7
|
export * from './generate-and-insert-slide.command';
|
|
8
8
|
export * from './export-as-pptx.command';
|
|
9
9
|
export * from './generate-slides.command';
|
|
10
|
-
export * from './get-presentation-slides-generation-price.command';
|
|
11
10
|
export * from './reposition-slide-outline.command';
|
|
12
11
|
export * from './update-slide-outline.command';
|
|
13
12
|
export * from './update-presentation.command';
|
|
@@ -19,7 +19,6 @@ export const PresentationSchema = z.object({
|
|
|
19
19
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
20
20
|
slideCount: z.number(),
|
|
21
21
|
isDeleted: z.boolean(),
|
|
22
|
-
tokenReservationId: z.string().nullable().optional(),
|
|
23
22
|
lastContentUpdateAt: z.date().nullable(),
|
|
24
23
|
lastPptxExportedAt: z.date().nullable(),
|
|
25
24
|
createdAt: z.date(),
|
|
@@ -4,7 +4,6 @@ export const PRESENTATION_AMQP_ROUTES = {
|
|
|
4
4
|
FIND_BY_UUID: 'tools.presentation.find-by-uuid.rpc',
|
|
5
5
|
GENERATE_PRESENTATION_OUTLINE: 'tools.presentation.generate-outline.rpc',
|
|
6
6
|
GENERATE_PRESENTATION_SLIDES: 'tools.presentation.generate-slides.rpc',
|
|
7
|
-
GET_SLIDES_GENERATION_PRICE: 'tools.presentation.slides.get-price.rpc',
|
|
8
7
|
GENERATE_AND_INSERT_SLIDE: 'tools.presentation.generate-and-insert-slide.rpc',
|
|
9
8
|
UPDATE_PRESENTATION_OUTLINE: 'tools.presentation.update-presentation-outline.rpc',
|
|
10
9
|
LIST_PRESENTATIONS: 'tools.presentation.list-presentations.rpc',
|
package/stt/commands/index.ts
CHANGED
|
@@ -5,10 +5,9 @@ import { STTJobSchema } from '../models';
|
|
|
5
5
|
export namespace RetrySTTJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
userBalance: z.number(),
|
|
8
9
|
userId: z.string().uuid().nullable().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
-
tokenReservationId: z.string().uuid(),
|
|
11
|
-
precalculatedPrice: z.number(),
|
|
12
11
|
});
|
|
13
12
|
export type Request = z.infer<typeof RequestSchema>;
|
|
14
13
|
|
|
@@ -6,13 +6,12 @@ export namespace STTCommand {
|
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
userId: z.string().uuid().nullable().optional(),
|
|
8
8
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
|
+
userBalance: z.number(),
|
|
9
10
|
modelId: z.string(),
|
|
10
11
|
fileId: z.string(),
|
|
11
12
|
fileKey: z.string(),
|
|
12
13
|
fileUrl: z.string(),
|
|
13
14
|
durationInSeconds: z.number(),
|
|
14
|
-
tokenReservationId: z.string().uuid(),
|
|
15
|
-
precalculatedPrice: z.number(),
|
|
16
15
|
});
|
|
17
16
|
export type Request = z.infer<typeof RequestSchema>;
|
|
18
17
|
|
|
@@ -19,7 +19,6 @@ export const STTJobSchema = z.object({
|
|
|
19
19
|
userId: z.string().nullable(),
|
|
20
20
|
unregisteredUserId: z.string().nullable(),
|
|
21
21
|
price: z.number(),
|
|
22
|
-
tokenReservationId: z.string().nullable().optional(),
|
|
23
22
|
isDeleted: z.boolean(),
|
|
24
23
|
createdAt: z.date(),
|
|
25
24
|
completedAt: z.date().nullable(),
|
package/tools/events/index.ts
CHANGED
package/tts/commands/index.ts
CHANGED
|
@@ -5,10 +5,9 @@ import { TTSJobSchema } from '../models/tts-job.schema';
|
|
|
5
5
|
export namespace RetryTTSJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
userBalance: z.number(),
|
|
8
9
|
userId: z.string().uuid().nullable().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
-
tokenReservationId: z.string().uuid(),
|
|
11
|
-
precalculatedPrice: z.number(),
|
|
12
11
|
});
|
|
13
12
|
export type Request = z.infer<typeof RequestSchema>;
|
|
14
13
|
|
|
@@ -6,6 +6,7 @@ export namespace TTSCommand {
|
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
userId: z.string().uuid().nullable().optional(),
|
|
8
8
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
|
+
userBalance: z.number(),
|
|
9
10
|
modelId: z.string(),
|
|
10
11
|
voiceId: z.string(),
|
|
11
12
|
userInput: z.string(),
|
|
@@ -17,8 +18,6 @@ export namespace TTSCommand {
|
|
|
17
18
|
style: z.number().optional(),
|
|
18
19
|
})
|
|
19
20
|
.optional(),
|
|
20
|
-
tokenReservationId: z.string().uuid(),
|
|
21
|
-
precalculatedPrice: z.number(),
|
|
22
21
|
});
|
|
23
22
|
export type Request = z.infer<typeof RequestSchema>;
|
|
24
23
|
|
|
@@ -25,7 +25,6 @@ export const TTSJobSchema = z.object({
|
|
|
25
25
|
duration: z.number(),
|
|
26
26
|
userId: z.string().nullable(),
|
|
27
27
|
unregisteredUserId: z.string().nullable(),
|
|
28
|
-
tokenReservationId: z.string().nullable().optional(),
|
|
29
28
|
isDeleted: z.boolean(),
|
|
30
29
|
params: TTSJobParamsSchema,
|
|
31
30
|
createdAt: z.date(),
|
package/video/commands/index.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './delete-all-video-jobs.command';
|
|
|
3
3
|
export * from './retry-video-job.command';
|
|
4
4
|
export * from './set-reaction-to-video-job.command';
|
|
5
5
|
export * from './video.command';
|
|
6
|
-
export * from './get-video-price.command';
|
|
7
6
|
export * from './update-video-job-title.command';
|
|
8
7
|
export * from './video-model';
|
|
9
8
|
export * from './update-published-status-video-jobs.command';
|
|
@@ -6,13 +6,12 @@ import { VideoGenerationRequestParamsSchema } from '../models';
|
|
|
6
6
|
export namespace RetryVideoJobCommand {
|
|
7
7
|
export const RequestSchema = z.object({
|
|
8
8
|
uuid: z.string().uuid(),
|
|
9
|
+
userBalance: z.number(),
|
|
9
10
|
userId: z.string().uuid().nullable().optional(),
|
|
10
11
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
12
|
prompt: z.string().optional(),
|
|
12
13
|
modelId: z.string().uuid().optional(),
|
|
13
14
|
params: VideoGenerationRequestParamsSchema.optional(),
|
|
14
|
-
tokenReservationId: z.string().uuid(),
|
|
15
|
-
precalculatedPrice: z.number(),
|
|
16
15
|
});
|
|
17
16
|
export type Request = z.infer<typeof RequestSchema>;
|
|
18
17
|
|
|
@@ -8,10 +8,9 @@ export namespace VideoCommand {
|
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
10
|
prompt: z.string(),
|
|
11
|
+
userBalance: z.number(),
|
|
11
12
|
modelId: z.string(),
|
|
12
13
|
params: VideoGenerationRequestParamsSchema,
|
|
13
|
-
tokenReservationId: z.string().uuid(),
|
|
14
|
-
precalculatedPrice: z.number(),
|
|
15
14
|
});
|
|
16
15
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
16
|
|
|
@@ -34,7 +34,6 @@ export const VideoJobSchema = z.object({
|
|
|
34
34
|
attempts: z.array(z.any()),
|
|
35
35
|
userId: z.string().nullable().optional(),
|
|
36
36
|
unregisteredUserId: z.string().nullable().optional(),
|
|
37
|
-
tokenReservationId: z.string().nullable().optional(),
|
|
38
37
|
isDeleted: z.boolean(),
|
|
39
38
|
createdAt: z.date(),
|
|
40
39
|
completedAt: z.date().nullable().optional(),
|
|
@@ -10,9 +10,8 @@ export namespace EditVideoCommand {
|
|
|
10
10
|
inputVideoId: z.string().uuid(),
|
|
11
11
|
inputVideoUrl: z.string(),
|
|
12
12
|
duration: z.number(),
|
|
13
|
+
userBalance: z.number(),
|
|
13
14
|
modelId: z.string().uuid(),
|
|
14
|
-
tokenReservationId: z.string().uuid(),
|
|
15
|
-
precalculatedPrice: z.number(),
|
|
16
15
|
});
|
|
17
16
|
export type Request = z.infer<typeof RequestSchema>;
|
|
18
17
|
|
|
@@ -5,5 +5,4 @@ export * from './set-reaction-to-video-editor-job.command';
|
|
|
5
5
|
export * from './update-video-editor-job-title.command';
|
|
6
6
|
export * from './update-published-status-video-editor-jobs.command';
|
|
7
7
|
export * from './edit-video.command';
|
|
8
|
-
export * from './get-video-editor-price.command';
|
|
9
8
|
export * from './video-editor-model';
|
|
@@ -5,6 +5,7 @@ import { VideoEditorJobSchema } from '../models/video-editor-job.schema';
|
|
|
5
5
|
export namespace RetryVideoEditorJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
+
userBalance: z.number(),
|
|
8
9
|
userId: z.string().uuid().nullable().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
11
|
prompt: z.string().optional(),
|
|
@@ -12,8 +13,6 @@ export namespace RetryVideoEditorJobCommand {
|
|
|
12
13
|
inputVideoUrl: z.string().optional(),
|
|
13
14
|
duration: z.number().optional(),
|
|
14
15
|
modelId: z.string().uuid().optional(),
|
|
15
|
-
tokenReservationId: z.string().uuid(),
|
|
16
|
-
precalculatedPrice: z.number(),
|
|
17
16
|
});
|
|
18
17
|
export type Request = z.infer<typeof RequestSchema>;
|
|
19
18
|
|
|
@@ -21,7 +21,6 @@ export const VideoEditorJobSchema = z.object({
|
|
|
21
21
|
attempts: z.array(z.any()),
|
|
22
22
|
userId: z.string().nullable().optional(),
|
|
23
23
|
unregisteredUserId: z.string().nullable().optional(),
|
|
24
|
-
tokenReservationId: z.string().nullable().optional(),
|
|
25
24
|
isPublished: z.boolean(),
|
|
26
25
|
postId: z.string().nullable(),
|
|
27
26
|
isDeleted: z.boolean(),
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export const VIDEO_EDITOR_AMQP_ROUTES = {
|
|
2
2
|
EXECUTE: 'tools.video-editor.execute.rpc',
|
|
3
|
-
GET_PRICE: 'tools.video-editor.get-price.rpc',
|
|
4
3
|
CONFIG: 'tools.video-editor.config.rpc',
|
|
5
4
|
GET_JOB: 'tools.video-editor.jobs.get.rpc',
|
|
6
5
|
LIST_JOBS: 'tools.video-editor.jobs.list.rpc',
|
|
@@ -7,8 +7,7 @@ export namespace GenerateWriterDocumentContentsCommand {
|
|
|
7
7
|
documentId: z.string().uuid(),
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
-
|
|
11
|
-
precalculatedPrice: z.number(),
|
|
10
|
+
userBalance: z.number(),
|
|
12
11
|
modelId: z.string(),
|
|
13
12
|
});
|
|
14
13
|
export type Request = z.infer<typeof RequestSchema>;
|
package/writer/commands/index.ts
CHANGED
|
@@ -2,9 +2,9 @@ export * from './create-writer-document.command';
|
|
|
2
2
|
export * from './delete-writer-document.command';
|
|
3
3
|
export * from './delete-all-user-writer-documents.command';
|
|
4
4
|
export * from './update-writer-document-outline.command';
|
|
5
|
+
export * from './update-writer-document-title-page.command';
|
|
5
6
|
export * from './export-writer-document-as-docx.command';
|
|
6
7
|
export * from './generate-document-contents.command';
|
|
7
|
-
export * from './get-writer-content-generation-price.command';
|
|
8
8
|
export * from './writer-paraphrase.command';
|
|
9
9
|
export * from './writer-extend-text.command';
|
|
10
10
|
export * from './writer-shorten-text.command';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common';
|
|
3
|
-
import { WriterDocumentOutlineSchema
|
|
3
|
+
import { WriterDocumentOutlineSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace UpdateWriterDocumentOutlineCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
userId: z.string().uuid().nullable().optional(),
|
|
8
8
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
9
|
documentId: z.string().uuid(),
|
|
10
|
-
titlePage: WriterDocumentTitlePageSchema,
|
|
11
10
|
data: WriterDocumentOutlineSchema,
|
|
12
11
|
});
|
|
13
12
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common';
|
|
3
|
+
import { WriterDocumentTitlePageSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateWriterDocumentTitlePageCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
userId: z.string().uuid().nullable().optional(),
|
|
8
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
|
+
documentId: z.string().uuid(),
|
|
10
|
+
titlePage: WriterDocumentTitlePageSchema,
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(WriterDocumentTitlePageSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
export const WriterDocumentTitlePageSchema = z
|
|
4
|
-
.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
13
|
-
.nullable();
|
|
3
|
+
export const WriterDocumentTitlePageSchema = z.object({
|
|
4
|
+
fullName: z.string().min(1).max(200).optional().nullable(),
|
|
5
|
+
city: z.string().min(1).max(200).optional().nullable(),
|
|
6
|
+
institution: z.string().min(1).max(300).optional().nullable(),
|
|
7
|
+
faculty: z.string().min(1).max(200).optional().nullable(),
|
|
8
|
+
specialty: z.string().min(1).max(200).optional().nullable(),
|
|
9
|
+
group: z.string().min(1).max(100).optional().nullable(),
|
|
10
|
+
subject: z.string().min(1).max(200).optional().nullable(),
|
|
11
|
+
});
|
|
14
12
|
|
|
15
13
|
export type WriterDocumentTitlePage = z.infer<typeof WriterDocumentTitlePageSchema>;
|