@purpleschool/gptbot-tools 0.0.118-stage-2 → 0.0.119

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 (135) hide show
  1. package/build/image-editor/commands/image-editor.command.js +1 -2
  2. package/build/image-editor/commands/index.js +0 -1
  3. package/build/image-editor/commands/retry-image-editor-job.command.js +1 -2
  4. package/build/image-editor/commands/update-published-status-image-editor-jobs.command.js +7 -1
  5. package/build/image-editor/models/image-editor-job.schema.js +1 -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 +1 -2
  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/commands/update-published-status-image-generation-jobs.command.js +7 -1
  11. package/build/image-generation/models/image-generation-job.schema.js +1 -1
  12. package/build/image-generation/routes/image-generation.amqp.routes.js +0 -1
  13. package/build/music/commands/generate-music.command.js +1 -2
  14. package/build/music/commands/index.js +0 -1
  15. package/build/music/commands/retry-music-job.command.js +1 -2
  16. package/build/music/commands/update-published-status-music-jobs.command.js +7 -1
  17. package/build/music/models/music-job.schema.js +1 -1
  18. package/build/music/routes/music.amqp.routes.js +0 -1
  19. package/build/paraphrase/commands/index.js +0 -1
  20. package/build/paraphrase/commands/paraphrase.command.js +1 -2
  21. package/build/paraphrase/commands/retry-paraphrase-job.command.js +1 -2
  22. package/build/paraphrase/models/paraphrase-job.schema.js +0 -1
  23. package/build/paraphrase/routes/paraphrase.amqp.routes.js +0 -1
  24. package/build/presentation/commands/generate-slides.command.js +1 -2
  25. package/build/presentation/commands/index.js +0 -1
  26. package/build/presentation/models/presentation.schema.js +0 -1
  27. package/build/presentation/routes/presentation.routes.js +0 -1
  28. package/build/stt/commands/index.js +0 -1
  29. package/build/stt/commands/retry-stt-job.command.js +1 -2
  30. package/build/stt/commands/stt.command.js +1 -2
  31. package/build/stt/models/stt-job.schema.js +0 -1
  32. package/build/stt/routes/stt.amqp.routes.js +0 -1
  33. package/build/tools/events/index.js +0 -1
  34. package/build/tools/models/tool-job.schema.js +0 -1
  35. package/build/tools/routes/tools.aqmp.routes.js +0 -1
  36. package/build/tts/commands/index.js +0 -1
  37. package/build/tts/commands/retry-tts-job.command.js +1 -2
  38. package/build/tts/commands/tts.command.js +1 -2
  39. package/build/tts/models/tts-job.schema.js +0 -1
  40. package/build/tts/routes/tts.amqp.routes.js +0 -1
  41. package/build/video/commands/index.js +0 -1
  42. package/build/video/commands/retry-video-job.command.js +1 -2
  43. package/build/video/commands/update-published-status-video-jobs.command.js +7 -1
  44. package/build/video/commands/video.command.js +1 -2
  45. package/build/video/models/video-job.schema.js +2 -1
  46. package/build/video/routes/video.amqp.routes.js +0 -1
  47. package/build/video-editor/commands/edit-video.command.js +1 -2
  48. package/build/video-editor/commands/index.js +0 -1
  49. package/build/video-editor/commands/retry-video-editor-job.command.js +1 -2
  50. package/build/video-editor/commands/update-published-status-video-editor-jobs.command.js +7 -1
  51. package/build/video-editor/models/video-editor-job.schema.js +1 -1
  52. package/build/video-editor/routes/video-editor.amqp.routes.js +0 -1
  53. package/build/writer/commands/generate-document-contents.command.js +1 -2
  54. package/build/writer/commands/index.js +0 -1
  55. package/build/writer/models/writer-document.schema.js +0 -1
  56. package/build/writer/routes/writer.routes.js +0 -1
  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/commands/update-published-status-image-editor-jobs.command.ts +9 -3
  61. package/image-editor/models/image-editor-job.schema.ts +1 -1
  62. package/image-editor/routes/image-editor.amqp.routes.ts +0 -1
  63. package/image-generation/commands/execute-image-generation.command.ts +1 -2
  64. package/image-generation/commands/index.ts +0 -1
  65. package/image-generation/commands/retry-image-generation-job.command.ts +3 -4
  66. package/image-generation/commands/update-published-status-image-generation-jobs.command.ts +9 -3
  67. package/image-generation/models/image-generation-job.schema.ts +1 -1
  68. package/image-generation/routes/image-generation.amqp.routes.ts +0 -1
  69. package/music/commands/generate-music.command.ts +1 -2
  70. package/music/commands/index.ts +0 -1
  71. package/music/commands/retry-music-job.command.ts +1 -2
  72. package/music/commands/update-published-status-music-jobs.command.ts +9 -3
  73. package/music/models/music-job.schema.ts +1 -1
  74. package/music/routes/music.amqp.routes.ts +0 -1
  75. package/package.json +1 -1
  76. package/paraphrase/commands/index.ts +0 -1
  77. package/paraphrase/commands/paraphrase.command.ts +1 -2
  78. package/paraphrase/commands/retry-paraphrase-job.command.ts +1 -2
  79. package/paraphrase/models/paraphrase-job.schema.ts +0 -1
  80. package/paraphrase/routes/paraphrase.amqp.routes.ts +0 -1
  81. package/presentation/commands/generate-slides.command.ts +1 -2
  82. package/presentation/commands/index.ts +0 -1
  83. package/presentation/models/presentation.schema.ts +0 -1
  84. package/presentation/routes/presentation.routes.ts +0 -1
  85. package/stt/commands/index.ts +0 -1
  86. package/stt/commands/retry-stt-job.command.ts +1 -2
  87. package/stt/commands/stt.command.ts +1 -2
  88. package/stt/models/stt-job.schema.ts +0 -1
  89. package/stt/routes/stt.amqp.routes.ts +0 -1
  90. package/tools/events/index.ts +0 -1
  91. package/tools/models/tool-job.schema.ts +0 -1
  92. package/tools/routes/tools.aqmp.routes.ts +0 -1
  93. package/tts/commands/index.ts +0 -1
  94. package/tts/commands/retry-tts-job.command.ts +1 -2
  95. package/tts/commands/tts.command.ts +1 -2
  96. package/tts/models/tts-job.schema.ts +0 -1
  97. package/tts/routes/tts.amqp.routes.ts +0 -1
  98. package/video/commands/index.ts +0 -1
  99. package/video/commands/retry-video-job.command.ts +1 -2
  100. package/video/commands/update-published-status-video-jobs.command.ts +9 -3
  101. package/video/commands/video.command.ts +1 -2
  102. package/video/models/video-job.schema.ts +2 -1
  103. package/video/routes/video.amqp.routes.ts +0 -1
  104. package/video-editor/commands/edit-video.command.ts +1 -2
  105. package/video-editor/commands/index.ts +0 -1
  106. package/video-editor/commands/retry-video-editor-job.command.ts +1 -2
  107. package/video-editor/commands/update-published-status-video-editor-jobs.command.ts +9 -3
  108. package/video-editor/models/video-editor-job.schema.ts +1 -1
  109. package/video-editor/routes/video-editor.amqp.routes.ts +0 -1
  110. package/writer/commands/generate-document-contents.command.ts +1 -2
  111. package/writer/commands/index.ts +0 -1
  112. package/writer/models/writer-document.schema.ts +0 -1
  113. package/writer/routes/writer.routes.ts +0 -1
  114. package/build/image-editor/commands/get-image-editor-price.command.js +0 -24
  115. package/build/image-generation/commands/get-image-generation-price.command.js +0 -22
  116. package/build/music/commands/get-music-price.command.js +0 -19
  117. package/build/paraphrase/commands/get-paraphrase-price.command.js +0 -15
  118. package/build/presentation/commands/get-presentation-slides-generation-price.command.js +0 -15
  119. package/build/stt/commands/get-stt-price.command.js +0 -16
  120. package/build/tools/events/tool-job-failed.event.js +0 -14
  121. package/build/tts/commands/get-tts-price.command.js +0 -16
  122. package/build/video/commands/get-video-price.command.js +0 -17
  123. package/build/video-editor/commands/get-video-editor-price.command.js +0 -15
  124. package/build/writer/commands/get-writer-content-generation-price.command.js +0 -16
  125. package/image-editor/commands/get-image-editor-price.command.ts +0 -26
  126. package/image-generation/commands/get-image-generation-price.command.ts +0 -24
  127. package/music/commands/get-music-price.command.ts +0 -21
  128. package/paraphrase/commands/get-paraphrase-price.command.ts +0 -16
  129. package/presentation/commands/get-presentation-slides-generation-price.command.ts +0 -16
  130. package/stt/commands/get-stt-price.command.ts +0 -17
  131. package/tools/events/tool-job-failed.event.ts +0 -13
  132. package/tts/commands/get-tts-price.command.ts +0 -17
  133. package/video/commands/get-video-price.command.ts +0 -18
  134. package/video-editor/commands/get-video-editor-price.command.ts +0 -16
  135. package/writer/commands/get-writer-content-generation-price.command.ts +0 -17
@@ -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(),
@@ -12,8 +12,14 @@ var UpdatePublishedStatusImageEditorJobsCommand;
12
12
  userId: zod_1.z.string().uuid().nullable().optional(),
13
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
14
  }),
15
- data: zod_1.z.object({
15
+ data: zod_1.z
16
+ .object({
16
17
  isPublished: zod_1.z.boolean(),
18
+ postId: zod_1.z.string().nullable().optional(),
19
+ })
20
+ .refine((data) => (data.isPublished ? !!data.postId : true), {
21
+ message: 'Post ID is required when job is published',
22
+ path: ['postId'],
17
23
  }),
18
24
  });
19
25
  UpdatePublishedStatusImageEditorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageEditorJobSchema);
@@ -26,8 +26,8 @@ exports.ImageEditorJobSchema = zod_1.z.object({
26
26
  userId: zod_1.z.string().nullable().optional(),
27
27
  unregisteredUserId: zod_1.z.string().nullable().optional(),
28
28
  isPublished: zod_1.z.boolean(),
29
+ postId: zod_1.z.string().nullable(),
29
30
  isDeleted: zod_1.z.boolean(),
30
- tokenReservationId: zod_1.z.string().nullable().optional(),
31
31
  createdAt: zod_1.z.date(),
32
32
  completedAt: zod_1.z.date().nullable().optional(),
33
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',
@@ -11,13 +11,12 @@ var ExecuteImageGenerationCommand;
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 = {}));
@@ -12,8 +12,14 @@ var UpdatePublishedStatusImageGenerationJobsCommand;
12
12
  userId: zod_1.z.string().uuid().nullable().optional(),
13
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
14
  }),
15
- data: zod_1.z.object({
15
+ data: zod_1.z
16
+ .object({
16
17
  isPublished: zod_1.z.boolean(),
18
+ postId: zod_1.z.string().nullable().optional(),
19
+ })
20
+ .refine((data) => (data.isPublished ? !!data.postId : true), {
21
+ message: 'Post ID is required when job is published',
22
+ path: ['postId'],
17
23
  }),
18
24
  });
19
25
  UpdatePublishedStatusImageGenerationJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
@@ -29,9 +29,9 @@ exports.ImageGenerationJobSchema = zod_1.z.object({
29
29
  userId: zod_1.z.string().nullable().optional(),
30
30
  unregisteredUserId: zod_1.z.string().nullable().optional(),
31
31
  isPublished: zod_1.z.boolean(),
32
+ postId: zod_1.z.string().nullable(),
32
33
  isDeleted: zod_1.z.boolean(),
33
34
  internalError: zod_1.z.string().nullable(),
34
- tokenReservationId: zod_1.z.string().nullable().optional(),
35
35
  createdAt: zod_1.z.date(),
36
36
  updatedAt: zod_1.z.date(),
37
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
  });
18
17
  GenerateMusicCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(music_job_schema_1.MusicJobSchema);
19
18
  })(GenerateMusicCommand || (exports.GenerateMusicCommand = GenerateMusicCommand = {}));
@@ -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
  });
@@ -12,8 +12,14 @@ var UpdatePublishedStatusMusicJobsCommand;
12
12
  userId: zod_1.z.string().uuid().nullable().optional(),
13
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
14
  }),
15
- data: zod_1.z.object({
15
+ data: zod_1.z
16
+ .object({
16
17
  isPublished: zod_1.z.boolean(),
18
+ postId: zod_1.z.string().nullable().optional(),
19
+ })
20
+ .refine((data) => (data.isPublished ? !!data.postId : true), {
21
+ message: 'Post ID is required when job is published',
22
+ path: ['postId'],
17
23
  }),
18
24
  });
19
25
  UpdatePublishedStatusMusicJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.MusicJobSchema);
@@ -47,8 +47,8 @@ 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
  isPublished: zod_1.z.boolean(),
50
+ postId: zod_1.z.string().nullable(),
50
51
  isDeleted: zod_1.z.boolean(),
51
- tokenReservationId: zod_1.z.string().nullable().optional(),
52
52
  createdAt: zod_1.z.date(),
53
53
  completedAt: zod_1.z.date().nullable().optional(),
54
54
  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 = {}));
@@ -12,8 +12,14 @@ var UpdatePublishedStatusVideoJobsCommand;
12
12
  userId: zod_1.z.string().uuid().nullable().optional(),
13
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
14
  }),
15
- data: zod_1.z.object({
15
+ data: zod_1.z
16
+ .object({
16
17
  isPublished: zod_1.z.boolean(),
18
+ postId: zod_1.z.string().nullable().optional(),
19
+ })
20
+ .refine((data) => (data.isPublished ? !!data.postId : true), {
21
+ message: 'Post ID is required when job is published',
22
+ path: ['postId'],
17
23
  }),
18
24
  });
19
25
  UpdatePublishedStatusVideoJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoJobSchema);
@@ -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 = {}));
@@ -17,6 +17,8 @@ exports.VideoJobSchema = zod_1.z.object({
17
17
  uuid: zod_1.z.string(),
18
18
  prompt: zod_1.z.string(),
19
19
  reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
20
+ isPublished: zod_1.z.boolean(),
21
+ postId: zod_1.z.string().nullable(),
20
22
  dislikeReason: zod_1.z.string().nullable(),
21
23
  externalId: zod_1.z.string().nullable(),
22
24
  title: zod_1.z.string(),
@@ -29,7 +31,6 @@ exports.VideoJobSchema = zod_1.z.object({
29
31
  attempts: zod_1.z.array(zod_1.z.any()),
30
32
  userId: zod_1.z.string().nullable().optional(),
31
33
  unregisteredUserId: zod_1.z.string().nullable().optional(),
32
- tokenReservationId: zod_1.z.string().nullable().optional(),
33
34
  isDeleted: zod_1.z.boolean(),
34
35
  createdAt: zod_1.z.date(),
35
36
  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 = {}));
@@ -12,8 +12,14 @@ var UpdatePublishedStatusVideoEditorJobsCommand;
12
12
  userId: zod_1.z.string().uuid().nullable().optional(),
13
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
14
  }),
15
- data: zod_1.z.object({
15
+ data: zod_1.z
16
+ .object({
16
17
  isPublished: zod_1.z.boolean(),
18
+ postId: zod_1.z.string().nullable().optional(),
19
+ })
20
+ .refine((data) => (data.isPublished ? !!data.postId : true), {
21
+ message: 'Post ID is required when job is published',
22
+ path: ['postId'],
17
23
  }),
18
24
  });
19
25
  UpdatePublishedStatusVideoEditorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
@@ -23,8 +23,8 @@ 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(),
27
+ postId: zod_1.z.string().nullable(),
28
28
  isDeleted: zod_1.z.boolean(),
29
29
  createdAt: zod_1.z.date(),
30
30
  completedAt: zod_1.z.date().nullable().optional(),
@@ -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',