@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.
Files changed (133) hide show
  1. package/build/common/errors/errors.js +5 -0
  2. package/build/image-editor/commands/image-editor.command.js +1 -2
  3. package/build/image-editor/commands/index.js +0 -1
  4. package/build/image-editor/commands/retry-image-editor-job.command.js +1 -2
  5. package/build/image-editor/models/image-editor-job.schema.js +0 -1
  6. package/build/image-editor/routes/image-editor.amqp.routes.js +0 -1
  7. package/build/image-generation/commands/execute-image-generation.command.js +2 -3
  8. package/build/image-generation/commands/index.js +0 -1
  9. package/build/image-generation/commands/retry-image-generation-job.command.js +3 -4
  10. package/build/image-generation/models/image-generation-job.schema.js +0 -1
  11. package/build/image-generation/routes/image-generation.amqp.routes.js +0 -1
  12. package/build/music/commands/generate-music.command.js +1 -2
  13. package/build/music/commands/index.js +0 -1
  14. package/build/music/commands/retry-music-job.command.js +1 -2
  15. package/build/music/models/music-job.schema.js +0 -1
  16. package/build/music/routes/music.amqp.routes.js +0 -1
  17. package/build/paraphrase/commands/index.js +0 -1
  18. package/build/paraphrase/commands/paraphrase.command.js +1 -2
  19. package/build/paraphrase/commands/retry-paraphrase-job.command.js +1 -2
  20. package/build/paraphrase/models/paraphrase-job.schema.js +0 -1
  21. package/build/paraphrase/routes/paraphrase.amqp.routes.js +0 -1
  22. package/build/presentation/commands/generate-slides.command.js +1 -2
  23. package/build/presentation/commands/index.js +0 -1
  24. package/build/presentation/models/presentation.schema.js +0 -1
  25. package/build/presentation/routes/presentation.routes.js +0 -1
  26. package/build/stt/commands/index.js +0 -1
  27. package/build/stt/commands/retry-stt-job.command.js +1 -2
  28. package/build/stt/commands/stt.command.js +1 -2
  29. package/build/stt/models/stt-job.schema.js +0 -1
  30. package/build/stt/routes/stt.amqp.routes.js +0 -1
  31. package/build/tools/events/index.js +0 -1
  32. package/build/tools/models/tool-job.schema.js +0 -1
  33. package/build/tools/routes/tools.aqmp.routes.js +0 -1
  34. package/build/tts/commands/index.js +0 -1
  35. package/build/tts/commands/retry-tts-job.command.js +1 -2
  36. package/build/tts/commands/tts.command.js +1 -2
  37. package/build/tts/models/tts-job.schema.js +0 -1
  38. package/build/tts/routes/tts.amqp.routes.js +0 -1
  39. package/build/video/commands/index.js +0 -1
  40. package/build/video/commands/retry-video-job.command.js +1 -2
  41. package/build/video/commands/video.command.js +1 -2
  42. package/build/video/models/video-job.schema.js +0 -1
  43. package/build/video/routes/video.amqp.routes.js +0 -1
  44. package/build/video-editor/commands/edit-video.command.js +1 -2
  45. package/build/video-editor/commands/index.js +0 -1
  46. package/build/video-editor/commands/retry-video-editor-job.command.js +1 -2
  47. package/build/video-editor/models/video-editor-job.schema.js +0 -1
  48. package/build/video-editor/routes/video-editor.amqp.routes.js +0 -1
  49. package/build/writer/commands/generate-document-contents.command.js +1 -2
  50. package/build/writer/commands/index.js +1 -1
  51. package/build/writer/commands/update-writer-document-outline.command.js +0 -1
  52. package/build/writer/commands/update-writer-document-title-page.command.js +16 -0
  53. package/build/writer/models/writer-document-title-page.schema.js +2 -4
  54. package/build/writer/models/writer-document.schema.js +0 -1
  55. package/build/writer/routes/writer.routes.js +1 -1
  56. package/common/errors/errors.ts +5 -0
  57. package/image-editor/commands/image-editor.command.ts +1 -2
  58. package/image-editor/commands/index.ts +0 -1
  59. package/image-editor/commands/retry-image-editor-job.command.ts +1 -2
  60. package/image-editor/models/image-editor-job.schema.ts +0 -1
  61. package/image-editor/routes/image-editor.amqp.routes.ts +0 -1
  62. package/image-generation/commands/execute-image-generation.command.ts +2 -3
  63. package/image-generation/commands/index.ts +0 -1
  64. package/image-generation/commands/retry-image-generation-job.command.ts +3 -4
  65. package/image-generation/models/image-generation-job.schema.ts +0 -1
  66. package/image-generation/routes/image-generation.amqp.routes.ts +0 -1
  67. package/music/commands/generate-music.command.ts +1 -2
  68. package/music/commands/index.ts +0 -1
  69. package/music/commands/retry-music-job.command.ts +1 -2
  70. package/music/models/music-job.schema.ts +0 -1
  71. package/music/routes/music.amqp.routes.ts +0 -1
  72. package/package.json +1 -1
  73. package/paraphrase/commands/index.ts +0 -1
  74. package/paraphrase/commands/paraphrase.command.ts +1 -2
  75. package/paraphrase/commands/retry-paraphrase-job.command.ts +1 -2
  76. package/paraphrase/models/paraphrase-job.schema.ts +0 -1
  77. package/paraphrase/routes/paraphrase.amqp.routes.ts +0 -1
  78. package/presentation/commands/generate-slides.command.ts +1 -2
  79. package/presentation/commands/index.ts +0 -1
  80. package/presentation/models/presentation.schema.ts +0 -1
  81. package/presentation/routes/presentation.routes.ts +0 -1
  82. package/stt/commands/index.ts +0 -1
  83. package/stt/commands/retry-stt-job.command.ts +1 -2
  84. package/stt/commands/stt.command.ts +1 -2
  85. package/stt/models/stt-job.schema.ts +0 -1
  86. package/stt/routes/stt.amqp.routes.ts +0 -1
  87. package/tools/events/index.ts +0 -1
  88. package/tools/models/tool-job.schema.ts +0 -1
  89. package/tools/routes/tools.aqmp.routes.ts +0 -1
  90. package/tts/commands/index.ts +0 -1
  91. package/tts/commands/retry-tts-job.command.ts +1 -2
  92. package/tts/commands/tts.command.ts +1 -2
  93. package/tts/models/tts-job.schema.ts +0 -1
  94. package/tts/routes/tts.amqp.routes.ts +0 -1
  95. package/video/commands/index.ts +0 -1
  96. package/video/commands/retry-video-job.command.ts +1 -2
  97. package/video/commands/video.command.ts +1 -2
  98. package/video/models/video-job.schema.ts +0 -1
  99. package/video/routes/video.amqp.routes.ts +0 -1
  100. package/video-editor/commands/edit-video.command.ts +1 -2
  101. package/video-editor/commands/index.ts +0 -1
  102. package/video-editor/commands/retry-video-editor-job.command.ts +1 -2
  103. package/video-editor/models/video-editor-job.schema.ts +0 -1
  104. package/video-editor/routes/video-editor.amqp.routes.ts +0 -1
  105. package/writer/commands/generate-document-contents.command.ts +1 -2
  106. package/writer/commands/index.ts +1 -1
  107. package/writer/commands/update-writer-document-outline.command.ts +1 -2
  108. package/writer/commands/update-writer-document-title-page.command.ts +16 -0
  109. package/writer/models/writer-document-title-page.schema.ts +9 -11
  110. package/writer/models/writer-document.schema.ts +0 -1
  111. package/writer/routes/writer.routes.ts +1 -1
  112. package/build/image-editor/commands/get-image-editor-price.command.js +0 -24
  113. package/build/image-generation/commands/get-image-generation-price.command.js +0 -22
  114. package/build/music/commands/get-music-price.command.js +0 -20
  115. package/build/paraphrase/commands/get-paraphrase-price.command.js +0 -15
  116. package/build/presentation/commands/get-presentation-slides-generation-price.command.js +0 -15
  117. package/build/stt/commands/get-stt-price.command.js +0 -16
  118. package/build/tools/events/tool-job-failed.event.js +0 -14
  119. package/build/tts/commands/get-tts-price.command.js +0 -16
  120. package/build/video/commands/get-video-price.command.js +0 -17
  121. package/build/video-editor/commands/get-video-editor-price.command.js +0 -15
  122. package/build/writer/commands/get-writer-content-generation-price.command.js +0 -16
  123. package/image-editor/commands/get-image-editor-price.command.ts +0 -26
  124. package/image-generation/commands/get-image-generation-price.command.ts +0 -24
  125. package/music/commands/get-music-price.command.ts +0 -22
  126. package/paraphrase/commands/get-paraphrase-price.command.ts +0 -16
  127. package/presentation/commands/get-presentation-slides-generation-price.command.ts +0 -16
  128. package/stt/commands/get-stt-price.command.ts +0 -17
  129. package/tools/events/tool-job-failed.event.ts +0 -13
  130. package/tts/commands/get-tts-price.command.ts +0 -17
  131. package/video/commands/get-video-price.command.ts +0 -18
  132. package/video-editor/commands/get-video-editor-price.command.ts +0 -16
  133. package/writer/commands/get-writer-content-generation-price.command.ts +0 -17
@@ -774,6 +774,11 @@ exports.ERRORS = {
774
774
  message: 'Произошла ошибка при экспорте документа в docx',
775
775
  httpCode: 500,
776
776
  },
777
+ TITLE_PAGE_UPDATE_ERROR: {
778
+ code: 'WRITER_DOCUMENT.TITLE_PAGE_UPDATE_ERROR',
779
+ message: 'Произошла ошибка при обновлении титульного листа документа',
780
+ httpCode: 500,
781
+ },
777
782
  },
778
783
  WRITER_AI_ACTION: {
779
784
  AI_ERROR: {
@@ -11,14 +11,13 @@ var ImageEditorCommand;
11
11
  userId: zod_1.z.string().uuid().nullable().optional(),
12
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
13
  prompt: zod_1.z.string(),
14
+ userBalance: zod_1.z.number(),
14
15
  modelId: zod_1.z.string(),
15
16
  params: zod_1.z.object({
16
17
  attachedFiles: zod_1.z.array(common_1.AttachedFileSchema),
17
18
  systemPromptId: zod_1.z.string().optional(),
18
19
  }),
19
20
  userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
20
- tokenReservationId: zod_1.z.string().uuid(),
21
- precalculatedPrice: zod_1.z.number(),
22
21
  });
23
22
  ImageEditorCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageEditorJobSchema);
24
23
  })(ImageEditorCommand || (exports.ImageEditorCommand = ImageEditorCommand = {}));
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./delete-image-editor-job-by-uuid.command"), exports);
18
18
  __exportStar(require("./delete-all-image-editor-jobs.command"), exports);
19
- __exportStar(require("./get-image-editor-price.command"), exports);
20
19
  __exportStar(require("./retry-image-editor-job.command"), exports);
21
20
  __exportStar(require("./set-reaction-to-image-editor-job.command"), exports);
22
21
  __exportStar(require("./image-editor.command"), exports);
@@ -8,11 +8,10 @@ var RetryImageEditorJobCommand;
8
8
  (function (RetryImageEditorJobCommand) {
9
9
  RetryImageEditorJobCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ userBalance: zod_1.z.number(),
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
14
  userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
14
- tokenReservationId: zod_1.z.string().uuid(),
15
- precalculatedPrice: zod_1.z.number(),
16
15
  modelId: zod_1.z.string().optional(),
17
16
  prompt: zod_1.z.string().optional(),
18
17
  params: models_1.ImageEditorJobParamsSchema.optional(),
@@ -28,7 +28,6 @@ exports.ImageEditorJobSchema = zod_1.z.object({
28
28
  isPublished: zod_1.z.boolean(),
29
29
  postId: zod_1.z.string().nullable(),
30
30
  isDeleted: zod_1.z.boolean(),
31
- tokenReservationId: zod_1.z.string().nullable().optional(),
32
31
  createdAt: zod_1.z.date(),
33
32
  completedAt: zod_1.z.date().nullable().optional(),
34
33
  updatedAt: zod_1.z.date(),
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IMAGE_EDITOR_AMQP_ROUTES = void 0;
4
4
  exports.IMAGE_EDITOR_AMQP_ROUTES = {
5
5
  EXECUTE: 'tools.image.execute.rpc',
6
- GET_PRICE: 'tools.image.get-price.rpc',
7
6
  CONFIG: 'tools.image.config.rpc',
8
7
  GET_JOB: 'tools.image.jobs.get.rpc',
9
8
  LIST_JOBS: 'tools.image.jobs.list.rpc',
@@ -3,21 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExecuteImageGenerationCommand = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
- const tools_1 = require("../../tools");
7
6
  const models_1 = require("../models");
7
+ const tools_1 = require("../../tools");
8
8
  var ExecuteImageGenerationCommand;
9
9
  (function (ExecuteImageGenerationCommand) {
10
10
  ExecuteImageGenerationCommand.RequestSchema = zod_1.z.object({
11
11
  userId: zod_1.z.string().uuid().nullable().optional(),
12
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
13
  prompt: zod_1.z.string(),
14
+ userBalance: zod_1.z.number(),
14
15
  modelId: zod_1.z.string().uuid(),
15
16
  params: models_1.ImageGenerationRequestParamsSchema,
16
17
  presetId: zod_1.z.string().uuid().nullable().optional(),
17
18
  origin: zod_1.z.nativeEnum(tools_1.JOB_REQUEST_ORIGIN).default(tools_1.JOB_REQUEST_ORIGIN.API),
18
19
  userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
19
- tokenReservationId: zod_1.z.string().uuid(),
20
- precalculatedPrice: zod_1.z.number(),
21
20
  });
22
21
  ExecuteImageGenerationCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
23
22
  })(ExecuteImageGenerationCommand || (exports.ExecuteImageGenerationCommand = ExecuteImageGenerationCommand = {}));
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./execute-image-generation.command"), exports);
18
18
  __exportStar(require("./forward-image-generation-job.command"), exports);
19
- __exportStar(require("./get-image-generation-price.command"), exports);
20
19
  __exportStar(require("./save-image-generation-job.command"), exports);
21
20
  __exportStar(require("./soft-delete-image-generation-job-by-uuid.command"), exports);
22
21
  __exportStar(require("./soft-delete-image-generation-jobs-by-criteria.command"), exports);
@@ -10,13 +10,12 @@ var RetryImageGenerationJobCommand;
10
10
  uuid: zod_1.z.string().uuid(),
11
11
  userId: zod_1.z.string().uuid().nullable().optional(),
12
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
14
- tokenReservationId: zod_1.z.string().uuid(),
15
- precalculatedPrice: zod_1.z.number(),
16
- modelId: zod_1.z.string().uuid().optional(),
17
13
  prompt: zod_1.z.string().optional(),
14
+ userBalance: zod_1.z.number(),
15
+ modelId: zod_1.z.string().uuid().optional(),
18
16
  params: models_1.ImageGenerationRequestParamsSchema.optional(),
19
17
  presetId: zod_1.z.string().uuid().nullable().optional(),
18
+ userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
20
19
  });
21
20
  RetryImageGenerationJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
22
21
  })(RetryImageGenerationJobCommand || (exports.RetryImageGenerationJobCommand = RetryImageGenerationJobCommand = {}));
@@ -32,7 +32,6 @@ exports.ImageGenerationJobSchema = zod_1.z.object({
32
32
  postId: zod_1.z.string().nullable(),
33
33
  isDeleted: zod_1.z.boolean(),
34
34
  internalError: zod_1.z.string().nullable(),
35
- tokenReservationId: zod_1.z.string().nullable().optional(),
36
35
  createdAt: zod_1.z.date(),
37
36
  updatedAt: zod_1.z.date(),
38
37
  });
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IMAGE_GENERATION_AMQP_ROUTES = void 0;
4
4
  exports.IMAGE_GENERATION_AMQP_ROUTES = {
5
5
  EXECUTE: 'tools.image-generation.execute.rpc',
6
- GET_PRICE: 'tools.image-generation.get-price.rpc',
7
6
  CONFIG: 'tools.image-generation.config.rpc',
8
7
  FORWARD_JOB: 'tools.image-generation.jobs.forward.rpc',
9
8
  GET_JOB: 'tools.image-generation.jobs.get.rpc',
@@ -10,10 +10,9 @@ var GenerateMusicCommand;
10
10
  GenerateMusicCommand.RequestSchema = zod_1.z.object({
11
11
  userId: zod_1.z.string().uuid().nullable().optional(),
12
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ userBalance: zod_1.z.number(),
13
14
  modelId: zod_1.z.string(),
14
15
  params: models_1.MusicJobParamsSchema,
15
- tokenReservationId: zod_1.z.string().uuid(),
16
- precalculatedPrice: zod_1.z.number(),
17
16
  userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
18
17
  });
19
18
  GenerateMusicCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(music_job_schema_1.MusicJobSchema);
@@ -19,7 +19,6 @@ __exportStar(require("./delete-all-music-jobs.command"), exports);
19
19
  __exportStar(require("./retry-music-job.command"), exports);
20
20
  __exportStar(require("./set-reaction-to-music-job.command"), exports);
21
21
  __exportStar(require("./generate-music.command"), exports);
22
- __exportStar(require("./get-music-price.command"), exports);
23
22
  __exportStar(require("./update-music-job-title.command"), exports);
24
23
  __exportStar(require("./convert-to-wav.command"), exports);
25
24
  __exportStar(require("./generate-lyrics.command"), exports);
@@ -8,10 +8,9 @@ var RetryMusicJobCommand;
8
8
  (function (RetryMusicJobCommand) {
9
9
  RetryMusicJobCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ userBalance: zod_1.z.number(),
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- tokenReservationId: zod_1.z.string().uuid(),
14
- precalculatedPrice: zod_1.z.number(),
15
14
  modelId: zod_1.z.string().uuid().optional(),
16
15
  params: music_job_schema_1.MusicJobParamsSchema.optional(),
17
16
  userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
@@ -47,7 +47,6 @@ exports.MusicJobSchema = zod_1.z.object({
47
47
  userId: zod_1.z.string().nullable().optional(),
48
48
  unregisteredUserId: zod_1.z.string().nullable().optional(),
49
49
  isDeleted: zod_1.z.boolean(),
50
- tokenReservationId: zod_1.z.string().nullable().optional(),
51
50
  createdAt: zod_1.z.date(),
52
51
  completedAt: zod_1.z.date().nullable().optional(),
53
52
  updatedAt: zod_1.z.date(),
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MUSIC_AMQP_ROUTES = void 0;
4
4
  exports.MUSIC_AMQP_ROUTES = {
5
5
  EXECUTE: 'tools.music.execute.rpc',
6
- GET_PRICE: 'tools.music.get-price.rpc',
7
6
  GENERATE_LYRICS: 'tools.music.generate-lyrics.rpc',
8
7
  CONVERT_TO_WAV: 'tools.music.convert-to-wav.rpc',
9
8
  CONFIG: 'tools.music.config.rpc',
@@ -20,4 +20,3 @@ __exportStar(require("./delete-all-paraphrase-jobs.command"), exports);
20
20
  __exportStar(require("./set-reaction-to-paraphrase-job.command"), exports);
21
21
  __exportStar(require("./update-paraphrase-job-title.command"), exports);
22
22
  __exportStar(require("./retry-paraphrase-job.command"), exports);
23
- __exportStar(require("./get-paraphrase-price.command"), exports);
@@ -10,12 +10,11 @@ var ParaphraseCommand;
10
10
  ParaphraseCommand.RequestSchema = zod_1.z.object({
11
11
  userId: zod_1.z.string().uuid().nullable().optional(),
12
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ userBalance: zod_1.z.number(),
13
14
  prompt: zod_1.z.string(),
14
15
  typeId: zod_1.z.string().uuid(),
15
16
  styleId: zod_1.z.string().uuid(),
16
17
  intensity: zod_1.z.nativeEnum(enums_1.PARAPHRASING_INTENSITY),
17
- tokenReservationId: zod_1.z.string().uuid(),
18
- precalculatedPrice: zod_1.z.number(),
19
18
  });
20
19
  ParaphraseCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(paraphrase_job_schema_1.ParaphraseJobSchema);
21
20
  })(ParaphraseCommand || (exports.ParaphraseCommand = ParaphraseCommand = {}));
@@ -8,10 +8,9 @@ var RetryParaphraseJobCommand;
8
8
  (function (RetryParaphraseJobCommand) {
9
9
  RetryParaphraseJobCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ userBalance: zod_1.z.number(),
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- tokenReservationId: zod_1.z.string().uuid(),
14
- precalculatedPrice: zod_1.z.number(),
15
14
  });
16
15
  RetryParaphraseJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(paraphrase_job_schema_1.ParaphraseJobSchema);
17
16
  })(RetryParaphraseJobCommand || (exports.RetryParaphraseJobCommand = RetryParaphraseJobCommand = {}));
@@ -21,7 +21,6 @@ exports.ParaphraseJobSchema = zod_1.z.object({
21
21
  typeId: zod_1.z.string(),
22
22
  styleId: zod_1.z.string(),
23
23
  intensity: zod_1.z.nativeEnum(enums_1.PARAPHRASING_INTENSITY),
24
- tokenReservationId: zod_1.z.string().nullable().optional(),
25
24
  createdAt: zod_1.z.date(),
26
25
  updatedAt: zod_1.z.date(),
27
26
  completedAt: zod_1.z.date().nullable(),
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PARAPHRASE_AMQP_ROUTES = void 0;
4
4
  exports.PARAPHRASE_AMQP_ROUTES = {
5
5
  EXECUTE: 'tools.paraphrase.execute.rpc',
6
- GET_PRICE: 'tools.paraphrase.get-price.rpc',
7
6
  CONFIG: 'tools.paraphrase.config.rpc',
8
7
  GET_JOB: 'tools.paraphrase.jobs.get.rpc',
9
8
  LIST_JOBS: 'tools.paraphrase.jobs.list.rpc',
@@ -10,8 +10,7 @@ var GenerateSlidesCommand;
10
10
  uuid: zod_1.z.string().uuid(),
11
11
  userId: zod_1.z.string().uuid().nullable().optional(),
12
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- tokenReservationId: zod_1.z.string().uuid(),
14
- precalculatedPrice: zod_1.z.number(),
13
+ userBalance: zod_1.z.number(),
15
14
  });
16
15
  GenerateSlidesCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationSchema);
17
16
  })(GenerateSlidesCommand || (exports.GenerateSlidesCommand = GenerateSlidesCommand = {}));
@@ -23,7 +23,6 @@ __exportStar(require("./generate-presentation-outline.command"), exports);
23
23
  __exportStar(require("./generate-and-insert-slide.command"), exports);
24
24
  __exportStar(require("./export-as-pptx.command"), exports);
25
25
  __exportStar(require("./generate-slides.command"), exports);
26
- __exportStar(require("./get-presentation-slides-generation-price.command"), exports);
27
26
  __exportStar(require("./reposition-slide-outline.command"), exports);
28
27
  __exportStar(require("./update-slide-outline.command"), exports);
29
28
  __exportStar(require("./update-presentation.command"), exports);
@@ -21,7 +21,6 @@ exports.PresentationSchema = zod_1.z.object({
21
21
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
22
22
  slideCount: zod_1.z.number(),
23
23
  isDeleted: zod_1.z.boolean(),
24
- tokenReservationId: zod_1.z.string().nullable().optional(),
25
24
  lastContentUpdateAt: zod_1.z.date().nullable(),
26
25
  lastPptxExportedAt: zod_1.z.date().nullable(),
27
26
  createdAt: zod_1.z.date(),
@@ -7,7 +7,6 @@ exports.PRESENTATION_AMQP_ROUTES = {
7
7
  FIND_BY_UUID: 'tools.presentation.find-by-uuid.rpc',
8
8
  GENERATE_PRESENTATION_OUTLINE: 'tools.presentation.generate-outline.rpc',
9
9
  GENERATE_PRESENTATION_SLIDES: 'tools.presentation.generate-slides.rpc',
10
- GET_SLIDES_GENERATION_PRICE: 'tools.presentation.slides.get-price.rpc',
11
10
  GENERATE_AND_INSERT_SLIDE: 'tools.presentation.generate-and-insert-slide.rpc',
12
11
  UPDATE_PRESENTATION_OUTLINE: 'tools.presentation.update-presentation-outline.rpc',
13
12
  LIST_PRESENTATIONS: 'tools.presentation.list-presentations.rpc',
@@ -19,5 +19,4 @@ __exportStar(require("./delete-all-stt-jobs.command"), exports);
19
19
  __exportStar(require("./retry-stt-job.command"), exports);
20
20
  __exportStar(require("./set-reaction-to-stt-job.command"), exports);
21
21
  __exportStar(require("./stt.command"), exports);
22
- __exportStar(require("./get-stt-price.command"), exports);
23
22
  __exportStar(require("./update-stt-job-title.command"), exports);
@@ -8,10 +8,9 @@ var RetrySTTJobCommand;
8
8
  (function (RetrySTTJobCommand) {
9
9
  RetrySTTJobCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ userBalance: zod_1.z.number(),
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- tokenReservationId: zod_1.z.string().uuid(),
14
- precalculatedPrice: zod_1.z.number(),
15
14
  });
16
15
  RetrySTTJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.STTJobSchema);
17
16
  })(RetrySTTJobCommand || (exports.RetrySTTJobCommand = RetrySTTJobCommand = {}));
@@ -9,13 +9,12 @@ var STTCommand;
9
9
  STTCommand.RequestSchema = zod_1.z.object({
10
10
  userId: zod_1.z.string().uuid().nullable().optional(),
11
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ userBalance: zod_1.z.number(),
12
13
  modelId: zod_1.z.string(),
13
14
  fileId: zod_1.z.string(),
14
15
  fileKey: zod_1.z.string(),
15
16
  fileUrl: zod_1.z.string(),
16
17
  durationInSeconds: zod_1.z.number(),
17
- tokenReservationId: zod_1.z.string().uuid(),
18
- precalculatedPrice: zod_1.z.number(),
19
18
  });
20
19
  STTCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(stt_job_schema_1.STTJobSchema);
21
20
  })(STTCommand || (exports.STTCommand = STTCommand = {}));
@@ -21,7 +21,6 @@ exports.STTJobSchema = zod_1.z.object({
21
21
  userId: zod_1.z.string().nullable(),
22
22
  unregisteredUserId: zod_1.z.string().nullable(),
23
23
  price: zod_1.z.number(),
24
- tokenReservationId: zod_1.z.string().nullable().optional(),
25
24
  isDeleted: zod_1.z.boolean(),
26
25
  createdAt: zod_1.z.date(),
27
26
  completedAt: zod_1.z.date().nullable(),
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.STT_AMQP_ROUTES = void 0;
4
4
  exports.STT_AMQP_ROUTES = {
5
5
  EXECUTE: 'tools.stt.execute.rpc',
6
- GET_PRICE: 'tools.stt.get-price.rpc',
7
6
  CONFIG: 'tools.stt.config.rpc',
8
7
  GET_JOB: 'tools.stt.jobs.get.rpc',
9
8
  LIST_JOBS: 'tools.stt.jobs.list.rpc',
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./tool-job-complete.event"), exports);
18
- __exportStar(require("./tool-job-failed.event"), exports);
@@ -7,7 +7,6 @@ exports.ToolJobSchema = zod_1.z.object({
7
7
  userId: zod_1.z.string().nullable(),
8
8
  unregisteredUserId: zod_1.z.string().nullable(),
9
9
  price: zod_1.z.number(),
10
- tokenReservationId: zod_1.z.string().nullable().optional(),
11
10
  createdAt: zod_1.z.date(),
12
11
  updatedAt: zod_1.z.date(),
13
12
  });
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TOOLS_AMQP_ROUTES = void 0;
4
4
  exports.TOOLS_AMQP_ROUTES = {
5
5
  JOB_COMPLETED: 'tools.job.completed',
6
- JOB_FAILED: 'tools.job.failed',
7
6
  FIND_ALL: 'tools.find.all.rpc',
8
7
  GET_GLOBAL_TOOLS_CONFIG: 'tools.config.rpc',
9
8
  GET_TOOLS_WITH_CONFIGS: 'tools.with-configs.rpc',
@@ -19,5 +19,4 @@ __exportStar(require("./delete-all-tts-jobs.command"), exports);
19
19
  __exportStar(require("./retry-tts-job.command"), exports);
20
20
  __exportStar(require("./set-reaction-to-tts-job.command"), exports);
21
21
  __exportStar(require("./tts.command"), exports);
22
- __exportStar(require("./get-tts-price.command"), exports);
23
22
  __exportStar(require("./update-tts-job-title.command"), exports);
@@ -8,10 +8,9 @@ var RetryTTSJobCommand;
8
8
  (function (RetryTTSJobCommand) {
9
9
  RetryTTSJobCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ userBalance: zod_1.z.number(),
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- tokenReservationId: zod_1.z.string().uuid(),
14
- precalculatedPrice: zod_1.z.number(),
15
14
  });
16
15
  RetryTTSJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(tts_job_schema_1.TTSJobSchema);
17
16
  })(RetryTTSJobCommand || (exports.RetryTTSJobCommand = RetryTTSJobCommand = {}));
@@ -9,6 +9,7 @@ var TTSCommand;
9
9
  TTSCommand.RequestSchema = zod_1.z.object({
10
10
  userId: zod_1.z.string().uuid().nullable().optional(),
11
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ userBalance: zod_1.z.number(),
12
13
  modelId: zod_1.z.string(),
13
14
  voiceId: zod_1.z.string(),
14
15
  userInput: zod_1.z.string(),
@@ -20,8 +21,6 @@ var TTSCommand;
20
21
  style: zod_1.z.number().optional(),
21
22
  })
22
23
  .optional(),
23
- tokenReservationId: zod_1.z.string().uuid(),
24
- precalculatedPrice: zod_1.z.number(),
25
24
  });
26
25
  TTSCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(tts_job_schema_1.TTSJobSchema);
27
26
  })(TTSCommand || (exports.TTSCommand = TTSCommand = {}));
@@ -25,7 +25,6 @@ exports.TTSJobSchema = zod_1.z.object({
25
25
  duration: zod_1.z.number(),
26
26
  userId: zod_1.z.string().nullable(),
27
27
  unregisteredUserId: zod_1.z.string().nullable(),
28
- tokenReservationId: zod_1.z.string().nullable().optional(),
29
28
  isDeleted: zod_1.z.boolean(),
30
29
  params: exports.TTSJobParamsSchema,
31
30
  createdAt: zod_1.z.date(),
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TTS_AMQP_ROUTES = void 0;
4
4
  exports.TTS_AMQP_ROUTES = {
5
5
  EXECUTE: 'tools.tts.execute.rpc',
6
- GET_PRICE: 'tools.tts.get-price.rpc',
7
6
  CONFIG: 'tools.tts.config.rpc',
8
7
  GET_JOB: 'tools.tts.jobs.get.rpc',
9
8
  LIST_JOBS: 'tools.tts.jobs.list.rpc',
@@ -19,7 +19,6 @@ __exportStar(require("./delete-all-video-jobs.command"), exports);
19
19
  __exportStar(require("./retry-video-job.command"), exports);
20
20
  __exportStar(require("./set-reaction-to-video-job.command"), exports);
21
21
  __exportStar(require("./video.command"), exports);
22
- __exportStar(require("./get-video-price.command"), exports);
23
22
  __exportStar(require("./update-video-job-title.command"), exports);
24
23
  __exportStar(require("./video-model"), exports);
25
24
  __exportStar(require("./update-published-status-video-jobs.command"), exports);
@@ -9,13 +9,12 @@ var RetryVideoJobCommand;
9
9
  (function (RetryVideoJobCommand) {
10
10
  RetryVideoJobCommand.RequestSchema = zod_1.z.object({
11
11
  uuid: zod_1.z.string().uuid(),
12
+ userBalance: zod_1.z.number(),
12
13
  userId: zod_1.z.string().uuid().nullable().optional(),
13
14
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
15
  prompt: zod_1.z.string().optional(),
15
16
  modelId: zod_1.z.string().uuid().optional(),
16
17
  params: models_1.VideoGenerationRequestParamsSchema.optional(),
17
- tokenReservationId: zod_1.z.string().uuid(),
18
- precalculatedPrice: zod_1.z.number(),
19
18
  });
20
19
  RetryVideoJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
21
20
  })(RetryVideoJobCommand || (exports.RetryVideoJobCommand = RetryVideoJobCommand = {}));
@@ -11,10 +11,9 @@ var VideoCommand;
11
11
  userId: zod_1.z.string().uuid().nullable().optional(),
12
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
13
  prompt: zod_1.z.string(),
14
+ userBalance: zod_1.z.number(),
14
15
  modelId: zod_1.z.string(),
15
16
  params: models_1.VideoGenerationRequestParamsSchema,
16
- tokenReservationId: zod_1.z.string().uuid(),
17
- precalculatedPrice: zod_1.z.number(),
18
17
  });
19
18
  VideoCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
20
19
  })(VideoCommand || (exports.VideoCommand = VideoCommand = {}));
@@ -33,7 +33,6 @@ exports.VideoJobSchema = zod_1.z.object({
33
33
  attempts: zod_1.z.array(zod_1.z.any()),
34
34
  userId: zod_1.z.string().nullable().optional(),
35
35
  unregisteredUserId: zod_1.z.string().nullable().optional(),
36
- tokenReservationId: zod_1.z.string().nullable().optional(),
37
36
  isDeleted: zod_1.z.boolean(),
38
37
  createdAt: zod_1.z.date(),
39
38
  completedAt: zod_1.z.date().nullable().optional(),
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VIDEO_AMQP_ROUTES = void 0;
4
4
  exports.VIDEO_AMQP_ROUTES = {
5
5
  EXECUTE: 'tools.video.execute.rpc',
6
- GET_PRICE: 'tools.video.get-price.rpc',
7
6
  CONFIG: 'tools.video.config.rpc',
8
7
  GET_JOB: 'tools.video.jobs.get.rpc',
9
8
  LIST_JOBS: 'tools.video.jobs.list.rpc',
@@ -13,9 +13,8 @@ var EditVideoCommand;
13
13
  inputVideoId: zod_1.z.string().uuid(),
14
14
  inputVideoUrl: zod_1.z.string(),
15
15
  duration: zod_1.z.number(),
16
+ userBalance: zod_1.z.number(),
16
17
  modelId: zod_1.z.string().uuid(),
17
- tokenReservationId: zod_1.z.string().uuid(),
18
- precalculatedPrice: zod_1.z.number(),
19
18
  });
20
19
  EditVideoCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoEditorJobSchema);
21
20
  })(EditVideoCommand || (exports.EditVideoCommand = EditVideoCommand = {}));
@@ -21,5 +21,4 @@ __exportStar(require("./set-reaction-to-video-editor-job.command"), exports);
21
21
  __exportStar(require("./update-video-editor-job-title.command"), exports);
22
22
  __exportStar(require("./update-published-status-video-editor-jobs.command"), exports);
23
23
  __exportStar(require("./edit-video.command"), exports);
24
- __exportStar(require("./get-video-editor-price.command"), exports);
25
24
  __exportStar(require("./video-editor-model"), exports);
@@ -8,6 +8,7 @@ var RetryVideoEditorJobCommand;
8
8
  (function (RetryVideoEditorJobCommand) {
9
9
  RetryVideoEditorJobCommand.RequestSchema = zod_1.z.object({
10
10
  uuid: zod_1.z.string().uuid(),
11
+ userBalance: zod_1.z.number(),
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
14
  prompt: zod_1.z.string().optional(),
@@ -15,8 +16,6 @@ var RetryVideoEditorJobCommand;
15
16
  inputVideoUrl: zod_1.z.string().optional(),
16
17
  duration: zod_1.z.number().optional(),
17
18
  modelId: zod_1.z.string().uuid().optional(),
18
- tokenReservationId: zod_1.z.string().uuid(),
19
- precalculatedPrice: zod_1.z.number(),
20
19
  });
21
20
  RetryVideoEditorJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
22
21
  })(RetryVideoEditorJobCommand || (exports.RetryVideoEditorJobCommand = RetryVideoEditorJobCommand = {}));
@@ -23,7 +23,6 @@ exports.VideoEditorJobSchema = zod_1.z.object({
23
23
  attempts: zod_1.z.array(zod_1.z.any()),
24
24
  userId: zod_1.z.string().nullable().optional(),
25
25
  unregisteredUserId: zod_1.z.string().nullable().optional(),
26
- tokenReservationId: zod_1.z.string().nullable().optional(),
27
26
  isPublished: zod_1.z.boolean(),
28
27
  postId: zod_1.z.string().nullable(),
29
28
  isDeleted: zod_1.z.boolean(),
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VIDEO_EDITOR_AMQP_ROUTES = void 0;
4
4
  exports.VIDEO_EDITOR_AMQP_ROUTES = {
5
5
  EXECUTE: 'tools.video-editor.execute.rpc',
6
- GET_PRICE: 'tools.video-editor.get-price.rpc',
7
6
  CONFIG: 'tools.video-editor.config.rpc',
8
7
  GET_JOB: 'tools.video-editor.jobs.get.rpc',
9
8
  LIST_JOBS: 'tools.video-editor.jobs.list.rpc',
@@ -10,8 +10,7 @@ var GenerateWriterDocumentContentsCommand;
10
10
  documentId: zod_1.z.string().uuid(),
11
11
  userId: zod_1.z.string().uuid().nullable().optional(),
12
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- tokenReservationId: zod_1.z.string().uuid(),
14
- precalculatedPrice: zod_1.z.number(),
13
+ userBalance: zod_1.z.number(),
15
14
  modelId: zod_1.z.string(),
16
15
  });
17
16
  GenerateWriterDocumentContentsCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterDocumentSchema);
@@ -18,9 +18,9 @@ __exportStar(require("./create-writer-document.command"), exports);
18
18
  __exportStar(require("./delete-writer-document.command"), exports);
19
19
  __exportStar(require("./delete-all-user-writer-documents.command"), exports);
20
20
  __exportStar(require("./update-writer-document-outline.command"), exports);
21
+ __exportStar(require("./update-writer-document-title-page.command"), exports);
21
22
  __exportStar(require("./export-writer-document-as-docx.command"), exports);
22
23
  __exportStar(require("./generate-document-contents.command"), exports);
23
- __exportStar(require("./get-writer-content-generation-price.command"), exports);
24
24
  __exportStar(require("./writer-paraphrase.command"), exports);
25
25
  __exportStar(require("./writer-extend-text.command"), exports);
26
26
  __exportStar(require("./writer-shorten-text.command"), exports);
@@ -10,7 +10,6 @@ var UpdateWriterDocumentOutlineCommand;
10
10
  userId: zod_1.z.string().uuid().nullable().optional(),
11
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
12
  documentId: zod_1.z.string().uuid(),
13
- titlePage: models_1.WriterDocumentTitlePageSchema,
14
13
  data: models_1.WriterDocumentOutlineSchema,
15
14
  });
16
15
  UpdateWriterDocumentOutlineCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterDocumentOutlineSchema);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateWriterDocumentTitlePageCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
6
+ const models_1 = require("../models");
7
+ var UpdateWriterDocumentTitlePageCommand;
8
+ (function (UpdateWriterDocumentTitlePageCommand) {
9
+ UpdateWriterDocumentTitlePageCommand.RequestSchema = zod_1.z.object({
10
+ userId: zod_1.z.string().uuid().nullable().optional(),
11
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
+ documentId: zod_1.z.string().uuid(),
13
+ titlePage: models_1.WriterDocumentTitlePageSchema,
14
+ });
15
+ UpdateWriterDocumentTitlePageCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterDocumentTitlePageSchema);
16
+ })(UpdateWriterDocumentTitlePageCommand || (exports.UpdateWriterDocumentTitlePageCommand = UpdateWriterDocumentTitlePageCommand = {}));
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WriterDocumentTitlePageSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- exports.WriterDocumentTitlePageSchema = zod_1.z
6
- .object({
5
+ exports.WriterDocumentTitlePageSchema = zod_1.z.object({
7
6
  fullName: zod_1.z.string().min(1).max(200).optional().nullable(),
8
7
  city: zod_1.z.string().min(1).max(200).optional().nullable(),
9
8
  institution: zod_1.z.string().min(1).max(300).optional().nullable(),
@@ -11,5 +10,4 @@ exports.WriterDocumentTitlePageSchema = zod_1.z
11
10
  specialty: zod_1.z.string().min(1).max(200).optional().nullable(),
12
11
  group: zod_1.z.string().min(1).max(100).optional().nullable(),
13
12
  subject: zod_1.z.string().min(1).max(200).optional().nullable(),
14
- })
15
- .nullable();
13
+ });
@@ -23,7 +23,6 @@ exports.WriterDocumentSchema = zod_1.z.object({
23
23
  dislikeReason: zod_1.z.string().nullable(),
24
24
  pages: zod_1.z.number(),
25
25
  isDeleted: zod_1.z.boolean(),
26
- tokenReservationId: zod_1.z.string().nullable().optional(),
27
26
  createdAt: zod_1.z.date(),
28
27
  updatedAt: zod_1.z.date(),
29
28
  completedAt: zod_1.z.date().nullable(),