@purpleschool/gptbot-tools 0.0.77-ai-proxy → 0.0.78-ai-proxy

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 (215) hide show
  1. package/ai-vendor/index.ts +1 -0
  2. package/ai-vendor/models/ai-vendor.schema.ts +13 -0
  3. package/ai-vendor/models/index.ts +1 -0
  4. package/build/ai-vendor/index.js +17 -0
  5. package/build/ai-vendor/models/ai-vendor.schema.js +13 -0
  6. package/build/ai-vendor/models/index.js +17 -0
  7. package/build/common/errors/errors.js +163 -0
  8. package/build/common/models/attached-file.schema.js +13 -0
  9. package/build/common/models/index.js +1 -0
  10. package/build/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.js +13 -0
  11. package/build/image-editor/commands/image-editor-model/index.js +17 -0
  12. package/build/image-editor/commands/image-editor.command.js +3 -1
  13. package/build/image-editor/commands/index.js +1 -0
  14. package/build/image-editor/commands/retry-image-editor-job.command.js +4 -0
  15. package/build/image-editor/commands/set-reaction-to-image-editor-job.command.js +12 -2
  16. package/build/image-editor/enums/image-editor-model-type.enum.js +2 -0
  17. package/build/image-editor/enums/image-editor-strategy.enum.js +4 -0
  18. package/build/image-editor/models/image-editor-config.schema.js +1 -0
  19. package/build/image-editor/models/image-editor-job.schema.js +2 -0
  20. package/build/image-editor/models/image-editor-model.schema.js +9 -1
  21. package/build/image-editor/routes/image-editor-model.amqp.routes.js +6 -0
  22. package/build/image-editor/routes/image-editor.http.routes.js +1 -0
  23. package/build/image-editor/routes/index.js +1 -0
  24. package/build/image-generation/commands/execute-image-generation.command.js +20 -0
  25. package/build/image-generation/commands/forward-image-generation-job.command.js +32 -0
  26. package/build/image-generation/commands/index.js +23 -0
  27. package/build/image-generation/commands/save-image-generation-job.command.js +17 -0
  28. package/build/image-generation/commands/set-reaction-to-image-generation-job.command.js +27 -0
  29. package/build/image-generation/commands/soft-delete-image-generation-job-by-uuid.command.js +14 -0
  30. package/build/image-generation/commands/soft-delete-image-generation-jobs-by-criteria.command.js +13 -0
  31. package/build/image-generation/commands/update-image-generation-job-title.command.js +16 -0
  32. package/build/image-generation/enums/image-generation-model-strategy.enum.js +23 -0
  33. package/build/image-generation/enums/image-generation-models.enum.js +8 -0
  34. package/build/image-generation/enums/image-generation-resolution.enum.js +9 -0
  35. package/build/image-generation/enums/index.js +19 -0
  36. package/build/image-generation/index.js +21 -0
  37. package/build/image-generation/models/image-generation-config.schema.js +12 -0
  38. package/build/image-generation/models/image-generation-job.schema.js +35 -0
  39. package/build/image-generation/models/image-generation-model.schema.js +51 -0
  40. package/build/image-generation/models/image-generation-preset.schema.js +13 -0
  41. package/build/image-generation/models/index.js +20 -0
  42. package/build/image-generation/queries/find-image-generation-job-by-id.query.js +19 -0
  43. package/build/image-generation/queries/find-image-generation-jobs.query.js +28 -0
  44. package/build/image-generation/queries/get-image-generation-config.query.js +11 -0
  45. package/build/image-generation/queries/index.js +19 -0
  46. package/build/image-generation/routes/image-generation.amqp.routes.js +14 -0
  47. package/build/image-generation/routes/image-generation.http.routes.js +9 -0
  48. package/build/image-generation/routes/index.js +18 -0
  49. package/build/index.js +6 -0
  50. package/build/music/commands/index.js +1 -0
  51. package/build/music/commands/music-model/get-music-model-by-uuid.command.js +13 -0
  52. package/build/music/commands/music-model/index.js +17 -0
  53. package/build/music/commands/retry-music-job.command.js +2 -0
  54. package/build/music/commands/set-reaction-to-music-job.command.js +12 -2
  55. package/build/music/models/music-job.schema.js +1 -0
  56. package/build/music/models/music-track.schema.js +1 -0
  57. package/build/music/routes/index.js +1 -0
  58. package/build/music/routes/music-model.amqp.routes.js +6 -0
  59. package/build/paraphrase/commands/delete-all-paraphrase-jobs.command.js +13 -0
  60. package/build/paraphrase/commands/delete-paraphrase-job-by-uuid.command.js +14 -0
  61. package/build/paraphrase/commands/index.js +5 -0
  62. package/build/paraphrase/commands/retry-paraphrase-job.command.js +16 -0
  63. package/build/paraphrase/commands/set-reaction-to-paraphrase-job.command.js +27 -0
  64. package/build/paraphrase/commands/update-paraphrase-job-title.command.js +16 -0
  65. package/build/paraphrase/models/paraphrase-job.schema.js +7 -0
  66. package/build/paraphrase/queries/find-paraphrase-jobs.query.js +28 -0
  67. package/build/paraphrase/queries/index.js +1 -0
  68. package/build/paraphrase/routes/paraphrase.amqp.routes.js +6 -0
  69. package/build/presentation/commands/index.js +1 -0
  70. package/build/presentation/commands/set-reaction-to-presentation.command.js +26 -0
  71. package/build/presentation/constants/slide-layout-map.constant.js +1 -0
  72. package/build/presentation/enums/slide-content-type.enum.js +1 -0
  73. package/build/presentation/models/pptx-export-payload.js +19 -1
  74. package/build/presentation/models/presentation.schema.js +3 -0
  75. package/build/presentation/models/slide-content-edit.schema.js +18 -1
  76. package/build/presentation/models/slide-content.schema.js +30 -1
  77. package/build/presentation/routes/presentation.routes.js +1 -0
  78. package/build/stt/commands/set-reaction-to-stt-job.command.js +12 -2
  79. package/build/stt/models/stt-job.schema.js +2 -0
  80. package/build/tools/enums/tool-content-type.enum.js +1 -0
  81. package/build/tools/enums/tool-type.enum.js +1 -0
  82. package/build/tools/models/global-tools-config.schema.js +2 -0
  83. package/build/tools/models/tool.schema.js +3 -0
  84. package/build/tools/models/tools-with-configs.schema.js +5 -0
  85. package/build/tts/commands/set-reaction-to-tts-job.command.js +12 -2
  86. package/build/tts/models/tts-job.schema.js +2 -0
  87. package/build/video/commands/index.js +1 -0
  88. package/build/video/commands/retry-video-job.command.js +4 -0
  89. package/build/video/commands/set-reaction-to-video-job.command.js +12 -2
  90. package/build/video/commands/video-model/get-video-model-by-uuid.command.js +13 -0
  91. package/build/video/commands/video-model/index.js +17 -0
  92. package/build/video/enums/video-pricing-rule-type.enum.js +1 -0
  93. package/build/video/enums/video-strategy.enum.js +1 -0
  94. package/build/video/models/video-job.schema.js +3 -0
  95. package/build/video/models/video-model.schema.js +9 -1
  96. package/build/video/routes/index.js +1 -0
  97. package/build/video/routes/video-model.amqp.routes.js +6 -0
  98. package/build/video/routes/video.http.routes.js +1 -0
  99. package/build/video/utils/calculate-video-generation-price.util.js +5 -1
  100. package/build/video-editor/commands/edit-video.command.js +2 -1
  101. package/build/video-editor/commands/index.js +1 -0
  102. package/build/video-editor/commands/retry-video-editor-job.command.js +5 -0
  103. package/build/video-editor/commands/set-reaction-to-video-editor-job.command.js +12 -2
  104. package/build/video-editor/commands/video-editor-model/get-video-editor-model.command.js +13 -0
  105. package/build/video-editor/commands/video-editor-model/index.js +17 -0
  106. package/build/video-editor/models/video-editor-job.schema.js +3 -0
  107. package/build/video-editor/routes/index.js +1 -0
  108. package/build/video-editor/routes/video-editor-model.amqp.routes.js +6 -0
  109. package/build/writer/commands/set-reaction-writer-document.command.js +11 -1
  110. package/build/writer/models/writer-document.schema.js +1 -0
  111. package/common/errors/errors.ts +163 -0
  112. package/common/models/attached-file.schema.ts +11 -0
  113. package/common/models/index.ts +1 -0
  114. package/image-editor/commands/image-editor-model/get-image-editor-model-by-uuid.command.ts +13 -0
  115. package/image-editor/commands/image-editor-model/index.ts +1 -0
  116. package/image-editor/commands/image-editor.command.ts +3 -1
  117. package/image-editor/commands/index.ts +1 -0
  118. package/image-editor/commands/retry-image-editor-job.command.ts +5 -1
  119. package/image-editor/commands/set-reaction-to-image-editor-job.command.ts +19 -6
  120. package/image-editor/enums/image-editor-model-type.enum.ts +2 -0
  121. package/image-editor/enums/image-editor-strategy.enum.ts +4 -0
  122. package/image-editor/models/image-editor-config.schema.ts +1 -0
  123. package/image-editor/models/image-editor-job.schema.ts +3 -1
  124. package/image-editor/models/image-editor-model.schema.ts +16 -0
  125. package/image-editor/routes/image-editor-model.amqp.routes.ts +3 -0
  126. package/image-editor/routes/image-editor.http.routes.ts +1 -0
  127. package/image-editor/routes/index.ts +1 -0
  128. package/image-generation/commands/execute-image-generation.command.ts +20 -0
  129. package/image-generation/commands/forward-image-generation-job.command.ts +32 -0
  130. package/image-generation/commands/index.ts +7 -0
  131. package/image-generation/commands/save-image-generation-job.command.ts +17 -0
  132. package/image-generation/commands/set-reaction-to-image-generation-job.command.ts +30 -0
  133. package/image-generation/commands/soft-delete-image-generation-job-by-uuid.command.ts +14 -0
  134. package/image-generation/commands/soft-delete-image-generation-jobs-by-criteria.command.ts +13 -0
  135. package/image-generation/commands/update-image-generation-job-title.command.ts +16 -0
  136. package/image-generation/enums/image-generation-model-strategy.enum.ts +24 -0
  137. package/image-generation/enums/image-generation-models.enum.ts +4 -0
  138. package/image-generation/enums/image-generation-resolution.enum.ts +5 -0
  139. package/image-generation/enums/index.ts +3 -0
  140. package/image-generation/index.ts +5 -0
  141. package/image-generation/models/image-generation-config.schema.ts +11 -0
  142. package/image-generation/models/image-generation-job.schema.ts +37 -0
  143. package/image-generation/models/image-generation-model.schema.ts +64 -0
  144. package/image-generation/models/image-generation-preset.schema.ts +13 -0
  145. package/image-generation/models/index.ts +4 -0
  146. package/image-generation/queries/find-image-generation-job-by-id.query.ts +19 -0
  147. package/image-generation/queries/find-image-generation-jobs.query.ts +33 -0
  148. package/image-generation/queries/get-image-generation-config.query.ts +11 -0
  149. package/image-generation/queries/index.ts +3 -0
  150. package/image-generation/routes/image-generation.amqp.routes.ts +11 -0
  151. package/image-generation/routes/image-generation.http.routes.ts +7 -0
  152. package/image-generation/routes/index.ts +2 -0
  153. package/index.ts +6 -0
  154. package/music/commands/index.ts +1 -0
  155. package/music/commands/music-model/get-music-model-by-uuid.command.ts +13 -0
  156. package/music/commands/music-model/index.ts +1 -0
  157. package/music/commands/retry-music-job.command.ts +3 -1
  158. package/music/commands/set-reaction-to-music-job.command.ts +19 -6
  159. package/music/models/music-job.schema.ts +1 -0
  160. package/music/models/music-track.schema.ts +1 -0
  161. package/music/routes/index.ts +1 -0
  162. package/music/routes/music-model.amqp.routes.ts +3 -0
  163. package/package.json +1 -1
  164. package/paraphrase/commands/delete-all-paraphrase-jobs.command.ts +13 -0
  165. package/paraphrase/commands/delete-paraphrase-job-by-uuid.command.ts +14 -0
  166. package/paraphrase/commands/index.ts +5 -0
  167. package/paraphrase/commands/retry-paraphrase-job.command.ts +16 -0
  168. package/paraphrase/commands/set-reaction-to-paraphrase-job.command.ts +30 -0
  169. package/paraphrase/commands/update-paraphrase-job-title.command.ts +16 -0
  170. package/paraphrase/models/paraphrase-job.schema.ts +7 -0
  171. package/paraphrase/queries/find-paraphrase-jobs.query.ts +33 -0
  172. package/paraphrase/queries/index.ts +1 -0
  173. package/paraphrase/routes/paraphrase.amqp.routes.ts +6 -0
  174. package/presentation/commands/index.ts +1 -0
  175. package/presentation/commands/set-reaction-to-presentation.command.ts +29 -0
  176. package/presentation/constants/slide-layout-map.constant.ts +1 -0
  177. package/presentation/enums/slide-content-type.enum.ts +1 -0
  178. package/presentation/models/pptx-export-payload.ts +20 -0
  179. package/presentation/models/presentation.schema.ts +3 -0
  180. package/presentation/models/slide-content-edit.schema.ts +21 -0
  181. package/presentation/models/slide-content.schema.ts +51 -0
  182. package/presentation/routes/presentation.routes.ts +1 -0
  183. package/stt/commands/set-reaction-to-stt-job.command.ts +19 -6
  184. package/stt/models/stt-job.schema.ts +2 -0
  185. package/tools/enums/tool-content-type.enum.ts +1 -0
  186. package/tools/enums/tool-type.enum.ts +1 -0
  187. package/tools/models/global-tools-config.schema.ts +2 -0
  188. package/tools/models/tool.schema.ts +3 -0
  189. package/tools/models/tools-with-configs.schema.ts +7 -0
  190. package/tts/commands/set-reaction-to-tts-job.command.ts +19 -6
  191. package/tts/models/tts-job.schema.ts +2 -0
  192. package/video/commands/index.ts +1 -0
  193. package/video/commands/retry-video-job.command.ts +4 -0
  194. package/video/commands/set-reaction-to-video-job.command.ts +19 -6
  195. package/video/commands/video-model/get-video-model-by-uuid.command.ts +13 -0
  196. package/video/commands/video-model/index.ts +1 -0
  197. package/video/enums/video-pricing-rule-type.enum.ts +1 -0
  198. package/video/enums/video-strategy.enum.ts +1 -0
  199. package/video/models/video-job.schema.ts +3 -0
  200. package/video/models/video-model.schema.ts +9 -1
  201. package/video/routes/index.ts +1 -0
  202. package/video/routes/video-model.amqp.routes.ts +3 -0
  203. package/video/routes/video.http.routes.ts +1 -0
  204. package/video/utils/calculate-video-generation-price.util.ts +7 -1
  205. package/video-editor/commands/edit-video.command.ts +2 -1
  206. package/video-editor/commands/index.ts +1 -0
  207. package/video-editor/commands/retry-video-editor-job.command.ts +5 -0
  208. package/video-editor/commands/set-reaction-to-video-editor-job.command.ts +19 -6
  209. package/video-editor/commands/video-editor-model/get-video-editor-model.command.ts +13 -0
  210. package/video-editor/commands/video-editor-model/index.ts +1 -0
  211. package/video-editor/models/video-editor-job.schema.ts +3 -0
  212. package/video-editor/routes/index.ts +1 -0
  213. package/video-editor/routes/video-editor-model.amqp.routes.ts +3 -0
  214. package/writer/commands/set-reaction-writer-document.command.ts +19 -6
  215. package/writer/models/writer-document.schema.ts +1 -0
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ParaphraseJobSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const tools_1 = require("../../tools");
6
+ const common_1 = require("../../common");
7
+ const enums_1 = require("../enums");
6
8
  exports.ParaphraseJobSchema = zod_1.z.object({
7
9
  uuid: zod_1.z.string(),
8
10
  userId: zod_1.z.string().nullable(),
@@ -12,8 +14,13 @@ exports.ParaphraseJobSchema = zod_1.z.object({
12
14
  aiTokenUsage: zod_1.z.number().nullable(),
13
15
  price: zod_1.z.number(),
14
16
  status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
17
+ title: zod_1.z.string(),
18
+ error: zod_1.z.string().nullable(),
19
+ reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
20
+ dislikeReason: zod_1.z.string().nullable(),
15
21
  typeId: zod_1.z.string(),
16
22
  styleId: zod_1.z.string(),
23
+ intensity: zod_1.z.nativeEnum(enums_1.PARAPHRASING_INTENSITY),
17
24
  createdAt: zod_1.z.date(),
18
25
  updatedAt: zod_1.z.date(),
19
26
  completedAt: zod_1.z.date().nullable(),
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindParaphraseJobsQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const paraphrase_job_schema_1 = require("../models/paraphrase-job.schema");
7
+ var FindParaphraseJobsQuery;
8
+ (function (FindParaphraseJobsQuery) {
9
+ FindParaphraseJobsQuery.RequestSchema = zod_1.z
10
+ .object({
11
+ userId: zod_1.z.string().uuid().optional(),
12
+ unregisteredUserId: zod_1.z.string().uuid().optional(),
13
+ title: zod_1.z.string().optional(),
14
+ limit: zod_1.z.coerce.number().min(1).optional(),
15
+ offset: zod_1.z.coerce.number().min(0).default(0).optional(),
16
+ })
17
+ .refine((data) => {
18
+ return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
19
+ }, {
20
+ message: 'At least userId or unregisteredUserId must be present',
21
+ path: ['userId', 'unregisteredUserId'],
22
+ });
23
+ FindParaphraseJobsQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
24
+ data: zod_1.z.array(paraphrase_job_schema_1.ParaphraseJobSchema),
25
+ page: zod_1.z.number(),
26
+ totalPages: zod_1.z.number(),
27
+ }));
28
+ })(FindParaphraseJobsQuery || (exports.FindParaphraseJobsQuery = FindParaphraseJobsQuery = {}));
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./find-paraphrase-job-by-uuid.query"), exports);
18
18
  __exportStar(require("./get-paraphrase-tool-config.query"), exports);
19
+ __exportStar(require("./find-paraphrase-jobs.query"), exports);
@@ -5,4 +5,10 @@ exports.PARAPHRASE_AMQP_ROUTES = {
5
5
  EXECUTE: 'tools.paraphrase.execute.rpc',
6
6
  CONFIG: 'tools.paraphrase.config.rpc',
7
7
  GET_JOB: 'tools.paraphrase.jobs.get.rpc',
8
+ LIST_JOBS: 'tools.paraphrase.jobs.list.rpc',
9
+ SET_REACTION: 'tools.paraphrase.jobs.set-reaction.rpc',
10
+ UPDATE_TITLE: 'tools.paraphrase.jobs.update-title.rpc',
11
+ SOFT_DELETE: 'tools.paraphrase.jobs.soft-delete.rpc',
12
+ SOFT_DELETE_ALL: 'tools.paraphrase.jobs.soft-delete-all.rpc',
13
+ RETRY: 'tools.paraphrase.jobs.retry.rpc',
8
14
  };
@@ -32,3 +32,4 @@ __exportStar(require("./update-slide-image-slot.command"), exports);
32
32
  __exportStar(require("./update-slide.command"), exports);
33
33
  __exportStar(require("./presentation-paraphrase.command"), exports);
34
34
  __exportStar(require("./presentation-generate-report.command"), exports);
35
+ __exportStar(require("./set-reaction-to-presentation.command"), exports);
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetReactionToPresentationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
6
+ const models_1 = require("../models");
7
+ var SetReactionToPresentationCommand;
8
+ (function (SetReactionToPresentationCommand) {
9
+ SetReactionToPresentationCommand.RequestSchema = zod_1.z
10
+ .object({
11
+ userId: zod_1.z.string().uuid().nullable().optional(),
12
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ uuid: zod_1.z.string().uuid(),
14
+ reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
15
+ dislikeReason: zod_1.z.string().nullable().default(null),
16
+ })
17
+ .refine((data) => {
18
+ if (data.reaction !== common_1.USER_REACTION.DISLIKED && data.dislikeReason) {
19
+ return false;
20
+ }
21
+ return true;
22
+ }, {
23
+ message: 'Dislike reason is not allowed when reaction is not disliked',
24
+ });
25
+ SetReactionToPresentationCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationSchema);
26
+ })(SetReactionToPresentationCommand || (exports.SetReactionToPresentationCommand = SetReactionToPresentationCommand = {}));
@@ -13,4 +13,5 @@ exports.SLIDE_LAYOUT_MAP = new Map([
13
13
  [enums_1.SLIDE_CONTENT_TYPE.THANK_YOU, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
14
14
  [enums_1.SLIDE_CONTENT_TYPE.TABLE, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
15
15
  [enums_1.SLIDE_CONTENT_TYPE.CHART, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
16
+ [enums_1.SLIDE_CONTENT_TYPE.TIMELINE, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
16
17
  ]);
@@ -12,4 +12,5 @@ var SLIDE_CONTENT_TYPE;
12
12
  SLIDE_CONTENT_TYPE["THANK_YOU"] = "THANK_YOU";
13
13
  SLIDE_CONTENT_TYPE["TABLE"] = "TABLE";
14
14
  SLIDE_CONTENT_TYPE["CHART"] = "CHART";
15
+ SLIDE_CONTENT_TYPE["TIMELINE"] = "TIMELINE";
15
16
  })(SLIDE_CONTENT_TYPE || (exports.SLIDE_CONTENT_TYPE = SLIDE_CONTENT_TYPE = {}));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PPTXExportPayloadSchema = exports.PPTXSlideSchema = exports.SlideBackground = exports.PPTXShapeSchema = exports.PPTXTableShapeSchema = exports.PPTXTableRowSchema = exports.PPTXTableCellSchema = exports.PPTXCustomShapeSchema = exports.PPTXPictureBoxSchema = exports.PPTXTextBoxSchema = exports.PPTXParagraphSchema = exports.PPTXFontSchema = exports.PPTXPositionSchema = exports.PPTXMarginSchema = exports.PPTXFillSchema = exports.PPTXShadowSchema = exports.PPTX_CUSTOM_SHAPE_TYPE = exports.PPTX_SHADOW_TYPE = exports.PPTX_FILL_TYPE = exports.PPTX_BORDER_TYPE = exports.PPTX_OBJECT_FIT = exports.PPTX_V_ALIGN = exports.PPTX_H_ALIGN = exports.PPTX_SHAPE_TYPE = void 0;
3
+ exports.PPTXExportPayloadSchema = exports.PPTXSlideSchema = exports.SlideBackground = exports.PPTXShapeSchema = exports.PPTXChevronShapeSchema = exports.PPTXTableShapeSchema = exports.PPTXTableRowSchema = exports.PPTXTableCellSchema = exports.PPTXCustomShapeSchema = exports.PPTXPictureBoxSchema = exports.PPTXTextBoxSchema = exports.PPTXParagraphSchema = exports.PPTXFontSchema = exports.PPTXPositionSchema = exports.PPTXMarginSchema = exports.PPTXFillSchema = exports.PPTXShadowSchema = exports.PPTX_CHEVRON_DIRECTION = exports.PPTX_CUSTOM_SHAPE_TYPE = exports.PPTX_SHADOW_TYPE = exports.PPTX_FILL_TYPE = exports.PPTX_BORDER_TYPE = exports.PPTX_OBJECT_FIT = exports.PPTX_V_ALIGN = exports.PPTX_H_ALIGN = exports.PPTX_SHAPE_TYPE = void 0;
4
4
  const zod_1 = require("zod");
5
5
  var PPTX_SHAPE_TYPE;
6
6
  (function (PPTX_SHAPE_TYPE) {
@@ -8,6 +8,7 @@ var PPTX_SHAPE_TYPE;
8
8
  PPTX_SHAPE_TYPE["PICTURE_BOX"] = "picture_box";
9
9
  PPTX_SHAPE_TYPE["CUSTOM_SHAPE"] = "custom_shape";
10
10
  PPTX_SHAPE_TYPE["TABLE"] = "table";
11
+ PPTX_SHAPE_TYPE["CHEVRON"] = "chevron";
11
12
  })(PPTX_SHAPE_TYPE || (exports.PPTX_SHAPE_TYPE = PPTX_SHAPE_TYPE = {}));
12
13
  var PPTX_H_ALIGN;
13
14
  (function (PPTX_H_ALIGN) {
@@ -49,6 +50,13 @@ var PPTX_CUSTOM_SHAPE_TYPE;
49
50
  (function (PPTX_CUSTOM_SHAPE_TYPE) {
50
51
  PPTX_CUSTOM_SHAPE_TYPE["ROUND_RECT"] = "roundRect";
51
52
  })(PPTX_CUSTOM_SHAPE_TYPE || (exports.PPTX_CUSTOM_SHAPE_TYPE = PPTX_CUSTOM_SHAPE_TYPE = {}));
53
+ var PPTX_CHEVRON_DIRECTION;
54
+ (function (PPTX_CHEVRON_DIRECTION) {
55
+ PPTX_CHEVRON_DIRECTION["RIGHT"] = "right";
56
+ PPTX_CHEVRON_DIRECTION["LEFT"] = "left";
57
+ PPTX_CHEVRON_DIRECTION["UP"] = "up";
58
+ PPTX_CHEVRON_DIRECTION["DOWN"] = "down";
59
+ })(PPTX_CHEVRON_DIRECTION || (exports.PPTX_CHEVRON_DIRECTION = PPTX_CHEVRON_DIRECTION = {}));
52
60
  exports.PPTXShadowSchema = zod_1.z.object({
53
61
  type: zod_1.z.nativeEnum(PPTX_SHADOW_TYPE),
54
62
  opacity: zod_1.z.number().min(0).max(100).optional().describe('percents, range 0-100'),
@@ -161,12 +169,22 @@ exports.PPTXTableShapeSchema = zod_1.z.object({
161
169
  px: zod_1.z.number(),
162
170
  }),
163
171
  });
172
+ // Chevron
173
+ exports.PPTXChevronShapeSchema = zod_1.z.object({
174
+ type: zod_1.z.literal(PPTX_SHAPE_TYPE.CHEVRON),
175
+ direction: zod_1.z.nativeEnum(PPTX_CHEVRON_DIRECTION).default(PPTX_CHEVRON_DIRECTION.RIGHT),
176
+ position: exports.PPTXPositionSchema,
177
+ fill: exports.PPTXFillSchema.optional(),
178
+ align: zod_1.z.nativeEnum(PPTX_H_ALIGN).optional().default(PPTX_H_ALIGN.CENTER),
179
+ valign: zod_1.z.nativeEnum(PPTX_V_ALIGN).optional().default(PPTX_V_ALIGN.MIDDLE),
180
+ });
164
181
  // Overview
165
182
  exports.PPTXShapeSchema = zod_1.z.discriminatedUnion('type', [
166
183
  exports.PPTXTextBoxSchema,
167
184
  exports.PPTXPictureBoxSchema,
168
185
  exports.PPTXCustomShapeSchema,
169
186
  exports.PPTXTableShapeSchema,
187
+ exports.PPTXChevronShapeSchema,
170
188
  ]);
171
189
  exports.SlideBackground = zod_1.z.union([
172
190
  exports.PPTXFillSchema,
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
5
5
  const enums_1 = require("../enums");
6
6
  const slide_outline_schema_1 = require("./slide-outline.schema");
7
7
  const slide_schema_1 = require("./slide.schema");
8
+ const common_1 = require("../../common");
8
9
  exports.PresentationSchema = zod_1.z.object({
9
10
  uuid: zod_1.z.string().uuid(),
10
11
  prompt: zod_1.z.string(),
@@ -14,6 +15,8 @@ exports.PresentationSchema = zod_1.z.object({
14
15
  languageId: zod_1.z.string(),
15
16
  templateId: zod_1.z.string(),
16
17
  downloadUrl: zod_1.z.string().nullable(),
18
+ reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
19
+ dislikeReason: zod_1.z.string().nullable(),
17
20
  userId: zod_1.z.string().uuid().nullable().optional(),
18
21
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
19
22
  slideCount: zod_1.z.number(),
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SlideContentUserEditSchema = exports.ChartSlideDataUserEditSchema = exports.BarChartSlideDataUserEditSchema = exports.TableSlideDataUserEditSchema = exports.SectionBreakSlideDataUserEditSchema = exports.ImageSlideDataUserEditSchema = exports.ContentsSlideDataUserEditSchema = exports.StructuredListSlideDataUserEditSchema = exports.TextSlideDataUserEditSchema = exports.ThankYouSlideDataUserEditSchema = exports.CoverSlideDataUserEditSchema = void 0;
6
+ exports.SlideContentUserEditSchema = exports.TimelineSlideDataUserEditSchema = exports.ChartSlideDataUserEditSchema = exports.BarChartSlideDataUserEditSchema = exports.TableSlideDataUserEditSchema = exports.SectionBreakSlideDataUserEditSchema = exports.ImageSlideDataUserEditSchema = exports.ContentsSlideDataUserEditSchema = exports.StructuredListSlideDataUserEditSchema = exports.TextSlideDataUserEditSchema = exports.ThankYouSlideDataUserEditSchema = exports.CoverSlideDataUserEditSchema = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
8
  const enums_1 = require("../enums");
9
9
  const slide_content_schema_1 = require("./slide-content.schema");
@@ -122,6 +122,22 @@ exports.ChartSlideDataUserEditSchema = zod_1.default.object({
122
122
  chart: zod_1.default.discriminatedUnion('type', [exports.BarChartSlideDataUserEditSchema]),
123
123
  version: zod_1.default.literal(1),
124
124
  });
125
+ exports.TimelineSlideDataUserEditSchema = zod_1.default.object({
126
+ contentType: zod_1.default.literal(enums_1.SLIDE_CONTENT_TYPE.TIMELINE),
127
+ title: zod_1.default.string().min(1).max(500),
128
+ description: zod_1.default.string().min(1).max(1000),
129
+ timeline: zod_1.default.object({
130
+ events: zod_1.default
131
+ .array(zod_1.default.object({
132
+ date: zod_1.default.string().min(1).max(100),
133
+ title: zod_1.default.string().min(1).max(200),
134
+ description: zod_1.default.string().min(1).max(500),
135
+ }))
136
+ .min(2)
137
+ .max(10),
138
+ }),
139
+ version: zod_1.default.literal(1),
140
+ });
125
141
  exports.SlideContentUserEditSchema = zod_1.default.discriminatedUnion('contentType', [
126
142
  exports.CoverSlideDataUserEditSchema,
127
143
  exports.StructuredListSlideDataUserEditSchema,
@@ -132,4 +148,5 @@ exports.SlideContentUserEditSchema = zod_1.default.discriminatedUnion('contentTy
132
148
  exports.ThankYouSlideDataUserEditSchema,
133
149
  exports.TableSlideDataUserEditSchema,
134
150
  exports.ChartSlideDataUserEditSchema,
151
+ exports.TimelineSlideDataUserEditSchema,
135
152
  ]);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SlideContentSchema = exports.ChartSlideDataSchema = exports.BarChartSlideDataSchema = exports.TableSlideDataSchema = exports.SectionBreakSlideDataSchema = exports.ImageSlideDataSchema = exports.ContentsSlideDataSchema = exports.TextSlideDataSchema = exports.StructuredListSlideDataSchema = exports.ThankYouSlideDataSchema = exports.CoverSlideDataSchema = exports.IconSlotSchema = exports.ImageSlotSchema = exports.SLIDE_CHART_TYPE = void 0;
3
+ exports.SlideContentSchema = exports.TimelineSlideDataSchema = exports.ChartSlideDataSchema = exports.BarChartSlideDataSchema = exports.TableSlideDataSchema = exports.SectionBreakSlideDataSchema = exports.ImageSlideDataSchema = exports.ContentsSlideDataSchema = exports.TextSlideDataSchema = exports.StructuredListSlideDataSchema = exports.ThankYouSlideDataSchema = exports.CoverSlideDataSchema = exports.IconSlotSchema = exports.ImageSlotSchema = exports.SLIDE_CHART_TYPE = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const enums_1 = require("../enums");
6
6
  var SLIDE_CHART_TYPE;
@@ -184,6 +184,34 @@ exports.ChartSlideDataSchema = zod_1.z.object({
184
184
  chart: zod_1.z.discriminatedUnion('type', [exports.BarChartSlideDataSchema]),
185
185
  version: zod_1.z.literal(1),
186
186
  });
187
+ exports.TimelineSlideDataSchema = zod_1.z.object({
188
+ contentType: zod_1.z.literal(enums_1.SLIDE_CONTENT_TYPE.TIMELINE),
189
+ title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
190
+ description: zod_1.z.string().describe('Brief context for the timeline').min(10).max(200),
191
+ timeline: zod_1.z.object({
192
+ events: zod_1.z
193
+ .array(zod_1.z.object({
194
+ date: zod_1.z
195
+ .string()
196
+ .describe('Date or time period label. MUST be general/approximate if exact date unknown (e.g., "Early 2020s", "Mid-1990s", "Recent years")')
197
+ .min(2)
198
+ .max(50),
199
+ title: zod_1.z
200
+ .string()
201
+ .describe('Event title. Prefer 2 words, max 3 words. Keep it short and punchy.')
202
+ .min(5)
203
+ .max(60),
204
+ description: zod_1.z
205
+ .string()
206
+ .describe('Brief description of the event or milestone')
207
+ .min(20)
208
+ .max(150),
209
+ }))
210
+ .length(4)
211
+ .describe('Timeline must contain exactly 4 chronological events'),
212
+ }),
213
+ version: zod_1.z.literal(1),
214
+ });
187
215
  exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
188
216
  exports.CoverSlideDataSchema,
189
217
  exports.StructuredListSlideDataSchema,
@@ -194,4 +222,5 @@ exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
194
222
  exports.ThankYouSlideDataSchema,
195
223
  exports.TableSlideDataSchema,
196
224
  exports.ChartSlideDataSchema,
225
+ exports.TimelineSlideDataSchema,
197
226
  ]);
@@ -21,6 +21,7 @@ exports.PRESENTATION_AMQP_ROUTES = {
21
21
  UPDATE_SLIDE: 'tools.presentation.update-slide.rpc',
22
22
  PARAPHRASE: 'tools.presentation.actions.paraphrase.rpc',
23
23
  GENERATE_REPORT: 'tools.presentation.actions.generate-report.rpc',
24
+ SET_REACTION: 'tools.presentation.set-reaction.rpc',
24
25
  };
25
26
  exports.PRESENTATION_SLIDE_OUTLINE_AMQP_ROUTES = {
26
27
  REPOSITION: 'tools.presentation.slide-outline.reposition-slide-outline.rpc',
@@ -7,11 +7,21 @@ const common_1 = require("../../common");
7
7
  const models_1 = require("../models");
8
8
  var SetReactionToSTTJobCommand;
9
9
  (function (SetReactionToSTTJobCommand) {
10
- SetReactionToSTTJobCommand.RequestSchema = zod_1.z.object({
10
+ SetReactionToSTTJobCommand.RequestSchema = zod_1.z
11
+ .object({
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- uuid: zod_1.z.string(),
14
+ uuid: zod_1.z.string().uuid(),
14
15
  reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
16
+ dislikeReason: zod_1.z.string().nullable().default(null),
17
+ })
18
+ .refine((data) => {
19
+ if (data.reaction !== common_1.USER_REACTION.DISLIKED && data.dislikeReason) {
20
+ return false;
21
+ }
22
+ return true;
23
+ }, {
24
+ message: 'Dislike reason is not allowed when reaction is not disliked',
15
25
  });
16
26
  SetReactionToSTTJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.STTJobSchema);
17
27
  })(SetReactionToSTTJobCommand || (exports.SetReactionToSTTJobCommand = SetReactionToSTTJobCommand = {}));
@@ -14,7 +14,9 @@ exports.STTJobSchema = zod_1.z.object({
14
14
  fileUrl: zod_1.z.string(),
15
15
  aiResponse: stt_response_schema_1.STTResponseSchema.nullable(),
16
16
  reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
17
+ dislikeReason: zod_1.z.string().nullable(),
17
18
  status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
19
+ duration: zod_1.z.number(),
18
20
  error: zod_1.z.string().nullable(),
19
21
  userId: zod_1.z.string().nullable(),
20
22
  unregisteredUserId: zod_1.z.string().nullable(),
@@ -4,6 +4,7 @@ exports.TOOL_CONTENT_TYPE = void 0;
4
4
  var TOOL_CONTENT_TYPE;
5
5
  (function (TOOL_CONTENT_TYPE) {
6
6
  TOOL_CONTENT_TYPE["IMAGE_EDITOR"] = "IMAGE_EDITOR";
7
+ TOOL_CONTENT_TYPE["IMAGE_GENERATION"] = "IMAGE_GENERATION";
7
8
  TOOL_CONTENT_TYPE["TEXT_TO_SPEECH"] = "TEXT_TO_SPEECH";
8
9
  TOOL_CONTENT_TYPE["SPEECH_TO_TEXT"] = "SPEECH_TO_TEXT";
9
10
  TOOL_CONTENT_TYPE["REPHRASE"] = "REPHRASE";
@@ -15,4 +15,5 @@ var TOOL_TYPE;
15
15
  TOOL_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
16
16
  TOOL_TYPE["MUSIC"] = "MUSIC";
17
17
  TOOL_TYPE["MUSIC_ACTION"] = "MUSIC_ACTION";
18
+ TOOL_TYPE["IMAGE_GENERATION"] = "IMAGE_GENERATION";
18
19
  })(TOOL_TYPE || (exports.TOOL_TYPE = TOOL_TYPE = {}));
@@ -7,6 +7,7 @@ const video_1 = require("../../video");
7
7
  const music_1 = require("../../music");
8
8
  const writer_1 = require("../../writer");
9
9
  const image_editor_1 = require("../../image-editor");
10
+ const image_generation_1 = require("../../image-generation");
10
11
  const paraphrase_1 = require("../../paraphrase");
11
12
  const presentation_1 = require("../../presentation");
12
13
  const video_editor_1 = require("../../video-editor");
@@ -17,6 +18,7 @@ exports.GlobalToolsConfigSchema = zod_1.z.object({
17
18
  [enums_1.TOOL_CONTENT_TYPE.MUSIC]: music_1.MusicConfigSchema,
18
19
  [enums_1.TOOL_CONTENT_TYPE.WRITER]: writer_1.WriterConfigSchema,
19
20
  [enums_1.TOOL_CONTENT_TYPE.IMAGE_EDITOR]: image_editor_1.ImageEditorConfigSchema,
21
+ [enums_1.TOOL_CONTENT_TYPE.IMAGE_GENERATION]: image_generation_1.ImageGenerationConfigSchema,
20
22
  [enums_1.TOOL_CONTENT_TYPE.REPHRASE]: paraphrase_1.ParaphraseToolConfigSchema,
21
23
  [enums_1.TOOL_CONTENT_TYPE.PRESENTATION]: presentation_1.PresentationConfigSchema,
22
24
  [enums_1.TOOL_CONTENT_TYPE.VIDEO_EDITOR]: video_editor_1.VideoEditorConfigSchema,
@@ -8,6 +8,9 @@ exports.ToolSchema = zod_1.z.object({
8
8
  title: zod_1.z.string(),
9
9
  description: zod_1.z.string(),
10
10
  icon: zod_1.z.string(),
11
+ alias: zod_1.z.string(),
12
+ bgColor: zod_1.z.string(),
13
+ iconColor: zod_1.z.string(),
11
14
  order: zod_1.z.number(),
12
15
  contentType: zod_1.z.nativeEnum(enums_1.TOOL_CONTENT_TYPE),
13
16
  createdAt: zod_1.z.date(),
@@ -7,6 +7,7 @@ const video_1 = require("../../video");
7
7
  const music_1 = require("../../music");
8
8
  const writer_1 = require("../../writer");
9
9
  const image_editor_1 = require("../../image-editor");
10
+ const image_generation_1 = require("../../image-generation");
10
11
  const paraphrase_1 = require("../../paraphrase");
11
12
  const presentation_1 = require("../../presentation");
12
13
  const video_editor_1 = require("../../video-editor");
@@ -31,6 +32,10 @@ exports.ToolWithConfigSchema = zod_1.z.discriminatedUnion('contentType', [
31
32
  contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.IMAGE_EDITOR),
32
33
  config: image_editor_1.ImageEditorConfigSchema,
33
34
  })),
35
+ tool_schema_1.ToolSchema.merge(zod_1.z.object({
36
+ contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.IMAGE_GENERATION),
37
+ config: image_generation_1.ImageGenerationConfigSchema,
38
+ })),
34
39
  tool_schema_1.ToolSchema.merge(zod_1.z.object({
35
40
  contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.REPHRASE),
36
41
  config: paraphrase_1.ParaphraseToolConfigSchema,
@@ -7,11 +7,21 @@ const tts_job_schema_1 = require("../models/tts-job.schema");
7
7
  const common_1 = require("../../common");
8
8
  var SetReactionToTTSJobCommand;
9
9
  (function (SetReactionToTTSJobCommand) {
10
- SetReactionToTTSJobCommand.RequestSchema = zod_1.z.object({
10
+ SetReactionToTTSJobCommand.RequestSchema = zod_1.z
11
+ .object({
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- uuid: zod_1.z.string(),
14
+ uuid: zod_1.z.string().uuid(),
14
15
  reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
16
+ dislikeReason: zod_1.z.string().nullable().default(null),
17
+ })
18
+ .refine((data) => {
19
+ if (data.reaction !== common_1.USER_REACTION.DISLIKED && data.dislikeReason) {
20
+ return false;
21
+ }
22
+ return true;
23
+ }, {
24
+ message: 'Dislike reason is not allowed when reaction is not disliked',
15
25
  });
16
26
  SetReactionToTTSJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(tts_job_schema_1.TTSJobSchema);
17
27
  })(SetReactionToTTSJobCommand || (exports.SetReactionToTTSJobCommand = SetReactionToTTSJobCommand = {}));
@@ -15,12 +15,14 @@ exports.TTSJobSchema = zod_1.z.object({
15
15
  userInput: zod_1.z.string(),
16
16
  aiResponse: zod_1.z.string().nullable(),
17
17
  reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
18
+ dislikeReason: zod_1.z.string().nullable(),
18
19
  title: zod_1.z.string(),
19
20
  status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
20
21
  error: zod_1.z.string().nullable(),
21
22
  modelId: zod_1.z.string(),
22
23
  voiceId: zod_1.z.string(),
23
24
  price: zod_1.z.number(),
25
+ duration: zod_1.z.number(),
24
26
  userId: zod_1.z.string().nullable(),
25
27
  unregisteredUserId: zod_1.z.string().nullable(),
26
28
  isDeleted: zod_1.z.boolean(),
@@ -20,3 +20,4 @@ __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
22
  __exportStar(require("./update-video-job-title.command"), exports);
23
+ __exportStar(require("./video-model"), exports);
@@ -4,6 +4,7 @@ exports.RetryVideoJobCommand = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
6
  const video_job_schema_1 = require("../models/video-job.schema");
7
+ const models_1 = require("../models");
7
8
  var RetryVideoJobCommand;
8
9
  (function (RetryVideoJobCommand) {
9
10
  RetryVideoJobCommand.RequestSchema = zod_1.z.object({
@@ -11,6 +12,9 @@ var RetryVideoJobCommand;
11
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(),
15
+ prompt: zod_1.z.string().optional(),
16
+ modelId: zod_1.z.string().uuid().optional(),
17
+ params: models_1.VideoGenerationRequestParamsSchema.optional(),
14
18
  });
15
19
  RetryVideoJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
16
20
  })(RetryVideoJobCommand || (exports.RetryVideoJobCommand = RetryVideoJobCommand = {}));
@@ -7,11 +7,21 @@ const video_job_schema_1 = require("../models/video-job.schema");
7
7
  const common_1 = require("../../common");
8
8
  var SetReactionToVideoJobCommand;
9
9
  (function (SetReactionToVideoJobCommand) {
10
- SetReactionToVideoJobCommand.RequestSchema = zod_1.z.object({
10
+ SetReactionToVideoJobCommand.RequestSchema = zod_1.z
11
+ .object({
11
12
  userId: zod_1.z.string().uuid().nullable().optional(),
12
13
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- uuid: zod_1.z.string(),
14
+ uuid: zod_1.z.string().uuid(),
14
15
  reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
16
+ dislikeReason: zod_1.z.string().nullable().default(null),
17
+ })
18
+ .refine((data) => {
19
+ if (data.reaction !== common_1.USER_REACTION.DISLIKED && data.dislikeReason) {
20
+ return false;
21
+ }
22
+ return true;
23
+ }, {
24
+ message: 'Dislike reason is not allowed when reaction is not disliked',
15
25
  });
16
26
  SetReactionToVideoJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
17
27
  })(SetReactionToVideoJobCommand || (exports.SetReactionToVideoJobCommand = SetReactionToVideoJobCommand = {}));
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetVideoModelByUuidCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const common_1 = require("../../../common");
7
+ var GetVideoModelByUuidCommand;
8
+ (function (GetVideoModelByUuidCommand) {
9
+ GetVideoModelByUuidCommand.RequestSchema = zod_1.z.object({
10
+ uuid: zod_1.z.string().uuid(),
11
+ });
12
+ GetVideoModelByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.VideoModelSchema);
13
+ })(GetVideoModelByUuidCommand || (exports.GetVideoModelByUuidCommand = GetVideoModelByUuidCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./get-video-model-by-uuid.command"), exports);
@@ -4,4 +4,5 @@ exports.VIDEO_PRICING_RULE_TYPE = void 0;
4
4
  var VIDEO_PRICING_RULE_TYPE;
5
5
  (function (VIDEO_PRICING_RULE_TYPE) {
6
6
  VIDEO_PRICING_RULE_TYPE["FLAT"] = "flat";
7
+ VIDEO_PRICING_RULE_TYPE["PER_SECOND"] = "per_second";
7
8
  })(VIDEO_PRICING_RULE_TYPE || (exports.VIDEO_PRICING_RULE_TYPE = VIDEO_PRICING_RULE_TYPE = {}));
@@ -9,4 +9,5 @@ var VIDEO_GENERATION_STRATEGY;
9
9
  VIDEO_GENERATION_STRATEGY["RUNWAY_CALLBACK"] = "RUNWAY_CALLBACK";
10
10
  VIDEO_GENERATION_STRATEGY["SORA_2_VIDEO_GENERATION_POLLING"] = "SORA_2_VIDEO_GENERATION_POLLING";
11
11
  VIDEO_GENERATION_STRATEGY["SORA_2_VIDEO_GENERATION_CALLBACK"] = "SORA_2_VIDEO_GENERATION_CALLBACK";
12
+ VIDEO_GENERATION_STRATEGY["SEEDANCE_VIDEO_GENERATION_CALLBACK"] = "SEEDANCE_VIDEO_GENERATION_CALLBACK";
12
13
  })(VIDEO_GENERATION_STRATEGY || (exports.VIDEO_GENERATION_STRATEGY = VIDEO_GENERATION_STRATEGY = {}));
@@ -6,13 +6,16 @@ const tools_1 = require("../../tools");
6
6
  const common_1 = require("../../common");
7
7
  exports.VideoJobParamsSchema = zod_1.z.object({
8
8
  imageUrls: zod_1.z.string().array().optional(),
9
+ imageIds: zod_1.z.array(zod_1.z.string()).optional(),
9
10
  duration: zod_1.z.number().optional(),
10
11
  aspectRatio: zod_1.z.string().optional(),
12
+ resolution: zod_1.z.string().optional(),
11
13
  });
12
14
  exports.VideoJobSchema = zod_1.z.object({
13
15
  uuid: zod_1.z.string(),
14
16
  prompt: zod_1.z.string(),
15
17
  reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
18
+ dislikeReason: zod_1.z.string().nullable(),
16
19
  externalId: zod_1.z.string().nullable(),
17
20
  title: zod_1.z.string(),
18
21
  status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
@@ -18,15 +18,23 @@ exports.VideoModelParamsSchema = zod_1.z.object({
18
18
  })
19
19
  .optional(),
20
20
  quality: zod_1.z.string().optional(),
21
+ resolution: zod_1.z
22
+ .object({
23
+ options: zod_1.z.array(zod_1.z.string()),
24
+ })
25
+ .optional(),
21
26
  });
22
27
  exports.VideoGenerationRequestParamsSchema = zod_1.z.object({
23
28
  imageUrls: zod_1.z.string().array().optional(),
29
+ imageIds: zod_1.z.array(zod_1.z.string()).optional(),
24
30
  duration: zod_1.z.number(),
25
31
  aspectRatio: zod_1.z.string().optional(),
26
32
  quality: zod_1.z.string().optional(),
33
+ resolution: zod_1.z.string().optional(),
27
34
  });
28
35
  exports.VideoModelPricingRuleConditionSchema = zod_1.z.object({
29
- aspectRatio: zod_1.z.string(),
36
+ aspectRatio: zod_1.z.string().optional(),
37
+ resolution: zod_1.z.string().optional(),
30
38
  });
31
39
  exports.VideoModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
32
40
  type: zod_1.z.nativeEnum(enums_1.VIDEO_PRICING_RULE_TYPE),
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./video.amqp.routes"), exports);
18
18
  __exportStar(require("./video.http.routes"), exports);
19
+ __exportStar(require("./video-model.amqp.routes"), exports);
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VIDEO_MODEL_AMQP_ROUTES = void 0;
4
+ exports.VIDEO_MODEL_AMQP_ROUTES = {
5
+ GET_MODEL_BY_UUID: 'tools.video.model.get-by-uuid.rpc',
6
+ };
@@ -6,4 +6,5 @@ exports.VIDEO_GENERATION_ROUTES = {
6
6
  KIE_VEO_CALLBACK: 'kie/veo/callback',
7
7
  KIE_RUNWAY_CALLBACK: 'kie/runway/callback',
8
8
  KIE_SORA_2_CALLBACK: 'kie/sora-2/callback',
9
+ KIE_SEEDANCE_CALLBACK: 'kie/seedance/callback',
9
10
  };
@@ -17,7 +17,11 @@ function matchesCondition(condition, params) {
17
17
  });
18
18
  }
19
19
  function calculateVideoGenerationPrice({ pricePerSecond, params, rules, }) {
20
- const base = pricePerSecond * params.duration;
20
+ const perSecondRule = rules
21
+ .filter((r) => r.type === enums_1.VIDEO_PRICING_RULE_TYPE.PER_SECOND)
22
+ .find((r) => matchesCondition(r.condition, params));
23
+ const effectivePricePerSecond = perSecondRule ? perSecondRule.value : pricePerSecond;
24
+ const base = effectivePricePerSecond * params.duration;
21
25
  const flatMarkup = rules.reduce((sum, r) => {
22
26
  if (r.type !== enums_1.VIDEO_PRICING_RULE_TYPE.FLAT) {
23
27
  return sum;
@@ -10,10 +10,11 @@ var EditVideoCommand;
10
10
  userId: zod_1.z.string().uuid().nullable().optional(),
11
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
12
  prompt: zod_1.z.string(),
13
+ inputVideoId: zod_1.z.string().uuid(),
13
14
  inputVideoUrl: zod_1.z.string(),
14
15
  duration: zod_1.z.number(),
15
16
  userBalance: zod_1.z.number(),
16
- modelId: zod_1.z.string(),
17
+ modelId: zod_1.z.string().uuid(),
17
18
  });
18
19
  EditVideoCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoEditorJobSchema);
19
20
  })(EditVideoCommand || (exports.EditVideoCommand = EditVideoCommand = {}));
@@ -20,3 +20,4 @@ __exportStar(require("./retry-video-editor-job.command"), exports);
20
20
  __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("./edit-video.command"), exports);
23
+ __exportStar(require("./video-editor-model"), exports);